0

ON add to cart option on product detail page . i am listening the event called checkout_cart_product_add_before and i created a custom observer for this.

It is getting called properly but i want to change the qty and variation which is getting passed from the request paramets.

$observer->getEvent()->getInfo();

if i print this i am getting the data properly.But i need to update the values which are in this object, based on some conditions.

2
  • when you want to change qty and variation after cart or before cart?
    – Amit Bera
    Jul 22 '20 at 8:57
  • checkout_cart_product_add_before - before the product is added to cart. i achieved it using plugin instead Jul 22 '20 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.