0

How to self check what event i am using, my event : <checkout_cart_product_add_after> how to print, i tried :

$event = $observer->getEvent()->getName(); 
Mage::log($event, null, 'logfile.log');

its not printing

  • You should be more specific in your question, so people can answer it... If you are using a custom module you'd be listening to a specific event, defined in your module config.xml file, and there should be the specific event name, if that's what you are asking – Raul Sanchez Aug 14 '19 at 11:26
  • @RaulSanchez Pls check with my updated post – zus Aug 16 '19 at 4:40
  • I hope now you peoples understand my post : @ Mohit Kumar Arora, Rohan Hapani, Jai, Manashvi Birla, Aasim Goriya – zus Aug 16 '19 at 5:36
1

You can listen to the sales_quote_save_after event, then use the quote to get the shipping rates. The following code can be used to get the list of shipping rates.

$quote->getShippingAddress()->getGroupedAllShippingRates();
| improve this answer | |
  • I need shipping methods, how to alter with your code – zus Aug 13 '19 at 9:52
  • create sales_quote_save_after observer – Rk Rathod Aug 13 '19 at 9:55
  • I just try to list what are all the shipping methods available using mage::log, i am getting error paste.ofcode.org/32Z2DhpEGzVMkqEuxeJLuZr – zus Aug 13 '19 at 10:01
  • Try This $observer->getShippingAddress()->getGroupedAllShippingRates(); – Rk Rathod Aug 13 '19 at 10:02
  • logfile.log not created in var/log location, my code -> paste.ofcode.org/DdR3aizM5cP5dbn6ghYdpf – zus Aug 13 '19 at 10:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.