1

I need to read the product options values just after a product is added to cart. I then have an observer on catalog_product_load_after (I use this event as trigger as my method is also called for product page which run the same event)

I tried to do :

$_product = $observer->getEvent()->getProduct();
$options = $_product->getOptions();

But it does not work…

Thank you for your help,

Alex

3
  • Do you want all options on the product or the specific options on the quote item? Oct 23 '14 at 14:37
  • I would like to access the options values entered by the customer on the product page...
    – Alexglvr
    Oct 24 '14 at 5:34
  • Then you need access to the quote_item, not the product. The product is a product, there are no information about customer, choosen options, etc. in it. Oct 25 '14 at 10:00
1

In fact, I think that when the catalog_product_load_after is called when a product is added to cart, the quote item is not yet defined. Therefore it seems not to be possible to access the item options values…

Indeed, if a $urlParams = Mage::app()->getRequest()->getParams(); is done on the observer, we can see that the options values are posted in the URL… So not stored yet in the item...

I then changed the triggering event of my method on checkout_cart_product_add_after

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.