3

how to show custom error message if billing/shipping(section) address is not valid .

or

How to create an observer before save billing & shipping address on checkout page in magento?

So for that I will fire an event.

Thanks.

8

You can use the standard controller action events: 'controller_action_predispatch_' . $this->getFullActionName()

In the case of the saveBilling action the event is controller_action_predispatch_checkout_onepage_saveBilling

and for saveShipping is controller_action_predispatch_checkout_onepage_saveShiping.

You can access the values sent to that action by

Mage::app()->getRequest()->getPost();
  • thank you now working, Now I have trigger a web message ins-ted of showing block. i think controller_action_predispatch_checkout_onepage_saveShipping inst-ed of `controller_action_predispatch_checkout_onepage_saveShiping' i'm right? any way thank you. – Magento007 Jul 10 '14 at 9:45
1

All you have to add function using this observer

sales_order_place_before

When Customer click on place order this observer triggered before placing the order.

Hope this will helps:)

  • I want fire after filling billing address details. which event I should use? – Magento007 Jul 9 '14 at 13:31
  • customer_address_save_before use this. – Charlie Jul 9 '14 at 13:35
  • I will come back after tried. – Magento007 Jul 9 '14 at 13:39
1

Try this

<events>
  <customer_address_save_before>
    <observers>
      <easylife_model_observer>
        <type>model</type>
        <class>Easylife_Validation_Model_Observer</class>
        <method>customAddressSa‌​veBefore</method>
      </easylife_model_observer>
    </observers>
  </customer_address_save_before>
</events>

sorry for correction. Now it's correct yesterday I post wrong?

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.