I'm observing the checkout_cart_add_product_complete
event and need to get the added quote item.
There was a previous post on this issue with a suggestion to flag the new quote item in checkout_cart_product_add_after
and then access it in checkout_cart_add_product_complete
.
My question is on a basic level – how exactly do I implement this solution if I only get passed the product in checkout_cart_add_product_complete
?
Link to previous post: Watching Add to Cart Event – quote item id is empty
Best Answer
You get the quote by:
then you have access to all items:
And follow the instructions of the original answer