2

when I select shipping method from shipping list on cart page or checkout page I want to remove product vat if it is satisfy my condition for that I was thinking if there is any event like after_shipping_method or something like that then my work would be done but I can't find on net and https://magento.stackexchange.com/ so I am asking this question.

so what I want to know is below : for ex : I have 3 shipping methods like

  • 1 day delivery : 20$
  • 3 day delivery : 10$
  • within one week : 5$

so when user select anyone out of these three which event is fired?

And I need some event that is useful for both cart and checkout page.And if there is not any event that is useful for both the pages then what are different events for cart and checkout page respectly?

Thanks

2

When the customer chooses one of the shipping methods, there are no events happen in the back-end until the appropriate form is submitted.

Thus, you have the two available options:

1.You can use js, but it’s not good or may be too complicated if you want to do it right.

2.You can use the sales_quote_collect_totals_before event and apply changes directly to the quote in the observer before the total will be calculated. Note, that all changes should be applied to exclude your VAT in the collect. In addition, you can pay attention to the sales_quote_collect_totals_after event, but you should be very careful when applying changes at this step. Both of these events will be called during the recalculation of the totals. Hence, the recalculating will happen each time when the shipping method is applied. In other words, it happens both on the cart page, when estimating after shipping method selection, and on the checkout page after the shipping method selection and proceeding to the next step.

0

I think their is no any event which gets call after selecting shipping method.

follow the link which list all possible events in magento.

https://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/

in this list events staring with checkout_cart_ are the events for cart and checkout page.

Hope this will help you.

  • What event used to find available shipping method using observer M1? @Ashish – zus Aug 13 at 9:39
0

Luckily, even I was looking for the same and found out this:

checkout_controller_onepage_save_shipping_method

Probably, this is the event that you want to observe.

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.