1

I am new to magento. I am using Sales_order_place_before event in my module. I have seen lots of valuable posts/discussions regarding this issue. But I haven't found a solution yet. So I hope someone will help me on this issue.

config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Observersample_Event>
            <version>0.0.1</version>
        </Observersample_Event>
    </modules>
    <global>
        <models>
            <Observersample_Event>
                <class>Observersample_Event_Model</class>
            </Observersample_Event>
        </models>
        <events>
            <slaes_order_place_before>
                <observers>
                    <observersample_event_model_observer>
                        <type>singleton</type>
                        <class>Observersample_Event_Model_Observer</class>
                        <method>example</method>
                    </observersample_event_model_observer>
                </observers>
            </slaes_order_place_before>
        </events>
    </global>
</config>

observer.php:

class Observersample_Event_Model_Observer{

    public function example($observer){

        Mage::log("Order is placed");
    }
}

And I have also enabled the log.

3

The event name is wrong. It should be slaes_order_place_before to sales_order_place_before. There is no such event with name slaes_order_place_before

  • Ah!! now i am getting the log message..Thanks @Amit Bera – Gayathri Jun 12 '15 at 5:37
  • k. ............................ – Amit Bera Jun 12 '15 at 5:41
4

your observer name has the typo mistake it should be sales_order_place_before

  • Ah!! now i am getting the log message..Thanks @Pradeep Sanku – Gayathri Jun 12 '15 at 5:38

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.