I am using Magento 1.9.2 and i am working on a custom extension.

My question is: How can i run custom php function when the checkout page is opened?

I know i have to mess around with the events of the extension config file but i am not exactly sure how i can point the function in the observer which i want to run when the checkout page is opened.

Here is events part of my config:




And in the observer i have added this:

public function checkitemsincartv($observer)
    $data = $observer->getEvent()->getOrder();
    Mage::log($data->debug(), null, "order.log", true);

But it seems to be not working.

How can i achieve that?

  • are you want order object at event? – Amit Bera Jul 15 '16 at 10:11
  • The important this is this function to run before the items are cleared and the order is placed. For that reason i asked how this function can be runned when the checkout page is opened. If other method will do the trick it's ok. Thanks for the help man! – Venelin Vasilev Jul 15 '16 at 10:13

Assume that you have default magento onepage checkout.

So you event should be


Instead of



As you have using IWD extension ,then your event may be:

  • I do not use the default checkout page. I use the onepage checkout extension by IWD. – Venelin Vasilev Jul 15 '16 at 10:04
  • I have updated my question. – Venelin Vasilev Jul 15 '16 at 10:05
  • let me check .. it may be different – Amit Bera Jul 15 '16 at 10:05
  • Is it possible ? – Venelin Vasilev Jul 15 '16 at 10:22
  • I have updated the config.xml in my question but still it seems that this function is not called... – Venelin Vasilev Jul 15 '16 at 10:30

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.