0

I just cant figure out where im going wrong.. can someone tell me?

app/etc/modules/Mynamespace_CheckoutOverrides.xml

<?xml version="1.0"?>
<config>
 <modules>
 <Mynamespace_CheckoutOverrides>
 <active>true</active>
 <codePool>local</codePool>
 <depends>
 <Made_Streamcheckout />
 </depends>
 </Mynamespace_CheckoutOverrides>
 </modules>
</config>

app/code/local/Mynamespace/CheckoutOverrides/etc/config.xml

<?xml version="1.0"?>
<config>
 <modules>
 <Mynamespace_CheckoutOverrides>
 <version>1.0.0</version>
 </Mynamespace_CheckoutOverrides>
 </modules>
 <global>
 <models>
 <streamcheckout>
 <rewrite>
 <url>Mynamespace_CheckoutOverrides_Model</url>
 </rewrite>
 </streamcheckout>
 </models>
 </global>
</config>

app/code/local/Mynamespace/CheckoutOverrides/Model/Streamcheckout.php

<?php
class Mynamespace_CheckoutOverrides_Model_Streamcheckout extends Made_Streamcheckout_Model_Streamcheckout
{
 public function saveAll($data)
 {
 mage::log('works'); 
 }
}

What am i missing here? :/

The streamcheckout config:

<?xml version="1.0" encoding="UTF-8"?>
<config>
 <modules>
 <Made_Streamcheckout>
 <version>1.3.0</version>
 </Made_Streamcheckout>
 </modules>
 <global>
 <resources>
 <streamcheckout_setup>
 <setup>
 <module>Made_Streamcheckout</module>
 </setup>
 </streamcheckout_setup>
 </resources>
 <models>
 <streamcheckout>
 <class>Made_Streamcheckout_Model</class>
 <resourceModel>streamcheckout_resource</resourceModel>
 </streamcheckout>
 <streamcheckout_resource>
 <class>Made_Streamcheckout_Model_Resource</class>
 <entities>
 <sales_order_additional>
 <table>streamcheckout_sales_order_additional</table>
 </sales_order_additional>
 <sales_quote_additional>
 <table>streamcheckout_sales_quote_additional</table>
 </sales_quote_additional>
 </entities>
 </streamcheckout_resource>
 <sales>
 <rewrite>
 <quote_address_total>Made_Streamcheckout_Model_Sales_Quote_Address_Total</quote_address_total>
 </rewrite>
 </sales>
 </models> 
 </global> 
</config>
asked Feb 27, 2017 at 11:52

1 Answer 1

1

Your model was wrong, use the whole class name.

app/code/local/Mynamespace/CheckoutOverrides/etc/config.xml

<?xml version="1.0"?>
 <config>
 <modules>
 <Mynamespace_CheckoutOverrides>
 <version>1.0.0</version>
 </Mynamespace_CheckoutOverrides>
 </modules>
 <global>
 <models>
 <mynamespacecheckoutoverrides>
 <class>Mynamespace_CheckoutOverrides_Model</class>
 </mynamespacecheckoutoverrides>
 <streamcheckout>
 <rewrite>
 <streamcheckout>Mynamespace_CheckoutOverrides_Model_Streamcheckout</streamcheckout>
 </rewrite>
 </streamcheckout>
 </models>
 </global>
</config>

Do not forget to delete you Magento cache after this change

answered Feb 27, 2017 at 11:54
9
  • Thank you! i edited my config, but sadly still doesnt work. Cleared cache many times, and looked for if module was active - it is. :/ Commented Feb 27, 2017 at 12:05
  • 1
    Please add the config.xml of Streamcheckout extension and also the class you want to override. Commented Feb 27, 2017 at 12:09
  • 1
    I've edited my answer, you have forgetten to declare your model class. Commented Feb 27, 2017 at 12:15
  • 1
    You forgot the code of the model you would like to override, thank you. Commented Feb 27, 2017 at 13:56
  • 1
    Yes and also the <rewrite> has a problem. You want to override class Made_Streamcheckout_Model_Streamcheckout but you digit <url>, so it means you were overriding Made_Streamcheckout_Model_Url. Commented Feb 27, 2017 at 14:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.