Reputation: 3987
In Magento I have an observer which listens to the sales_order_save_before
event. This event is called before the order is saved. This happens in the checkout before the success site AND in the backend if you save the order there.
I only want the logic to run in the checkout not in the backend. So, how can I check in my observer if the user is in the checkout?
Upvotes: 1
Views: 966
Reputation: 4141
You defined your observer in
<config>
<global></global>
<config>
If you define it in
<config>
<frontend></frontend>
<config>
is only runs in frontend.
Upvotes: 3
Reputation: 5695
Have you checked this out? http://www.yireo.com/tutorials/magento/magento-programming/633-events-with-magento-checkout
and this, http://www.magentocommerce.com/wiki/5_-_modules_and_development/reference/events
here is a great events cheatsheet, http://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/
Upvotes: 1