0

I created a custom extension that should fire when a purchase is successful but the Observer function is not working. Below is my config file and Model

<?xml version="1.0"?>
<config>
        <modules>
        <Net_Saver>
            <version>0.1.0</version>
        </Net_Saver>
        </modules>
        <global>
        <helpers>
            <saver>
                <class>Net_Saver_Helper</class>
            </saver>
        </helpers>
        </global>
        <models>
            <net_saver>
            <class>Net_Saver_Model</class>
            </net_saver>
        </models>
    <events>
        <checkout_onepage_controller_success_action>
        <observers>
            <net_saver>
            <class>net_saver/observer</class>
            <method>sendOrder</method>
            </net_saver>
        </observers>
        </checkout_onepage_controller_success_action>
    </events>

</config>

Here's the Model

class Net_Saver_Model_Observer
{

    public function sendOrder(Varien_Event_Observer $observer)
    {
       //details removed
     }
}

Anyone know what i am missing?

2

The closing </global> tag is not correctly placed in your config.xml file, move it to the end of the file, right before </config> closing tag

Fix that, the rest of the code seems to be ok

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.