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

closed as unclear what you're asking by Mohit Kumar Arora, Rohan Hapani, Jai, Manashvi Birla, Aasim Goriya Aug 13 at 11:25

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 at 11:26
  • @RaulSanchez Pls check with my updated post – zus Aug 16 at 4:40
  • I hope now you peoples understand my post : @ Mohit Kumar Arora, Rohan Hapani, Jai, Manashvi Birla, Aasim Goriya – zus Aug 16 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();
  • I need shipping methods, how to alter with your code – zus Aug 13 at 9:52
  • create sales_quote_save_after observer – Rk Rathod Aug 13 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 at 10:01
  • Try This $observer->getShippingAddress()->getGroupedAllShippingRates(); – Rk Rathod Aug 13 at 10:02
  • logfile.log not created in var/log location, my code -> paste.ofcode.org/DdR3aizM5cP5dbn6ghYdpf – zus Aug 13 at 10:05

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