0

what is the name of the event that I can trigger after adding a product to the cart ?

I need this :

  1. The customer adds a product to his cart
  2. Intercept the event
  3. thanks to the result of and API, add some product for free to the cart
2
  • Please specify magento version?
    – Amit Bera
    Jan 9, 2019 at 9:25
  • I have the version 2.2.4 Jan 9, 2019 at 9:26

1 Answer 1

1

Event name is checkout_cart_add_product_complete

3
  • I found this : magento.stackexchange.com/questions/213754/… which one is the best ? Jan 8, 2019 at 14:02
  • If you want trigger just after add to cart you can also use : checkout_cart_product_add_after. By the way we suggest checkout_cart_add_product_complete event. Jan 8, 2019 at 14:05
  • Can you please give an example code for checkout_cart_add_product_complete event Aug 28, 2020 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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