cancel
Showing results for 
Search instead for 
Did you mean: 

Recently added item to cart

0 Kudos

Recently added item to cart

Issue

Currently there is no simple way to check what quote item was just added to the cart. This causes issues for module developers who need to work out what item was added to the cart for a custom module.

 

Possible Solution

Right now we have:

$this->checkoutSession->getLastAddedProductId();

To get the last added product however there is no way to fetch the item id. A possible solution is to give us a saved session for getLastAddedItemId for example:

$this->checkoutSession->getLastAddedItemId();