What I would like to do is add a product and a coupon to the cart at the same time from a product page.
The reasoning behind this is we are creating a landing page for a specific coupon and want to add both the product and coupon to the cart with only a single click for the user.
Best Answer
Hi Have you tried event
checkout_cart_add_product_complete
and This event is sending paramsproduct cart params and product object
to ObserverThat using this event you can add your coupon code
If you want
apply coupon from product page
then createa input on product page or product add to cart url
and send(coupon_code=yourcouponCode)
.then you get coupon code at observer using
$oberver->getEvent()->getRequest()->getParam('coupon_code')