0

Magento version 2.4.6

I am listening to the checkout_cart_product_add_after event to modify the price of a product when it is added to the cart. That works just fine.

Now, if the product has a min sale qty set, I want to skip that validation and add the product to the cart with qty 1. The checkout_cart_product_add_after is too late for that, so I guess I need another event where I can access the quote item.

I tried several events, no one had the quiet item available using $item = $observer->getEvent()->getData('quote_item'); or $item = $observer->getQuoteItem().

Any idea how to solve that?

Thanks

0

Your Answer

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

Browse other questions tagged or ask your own question.