cart icon indicating copy to clipboard operation
cart copied to clipboard

Remove unavailable products from cart session

Open dahaupt opened this issue 3 years ago • 0 comments

Feature Request

Is your feature request related to a problem? Please describe. We are using the event \Extcode\Cart\Event\RetrieveProductsFromRequestEvent to add products from a custom extension. A product is not removed automatically from the cart, if it becomes unavailable within our extension (e.g. deleted or just hidden).

In our case, this state even causes an exception in the frontend of the shopping cart, because the product from our extension is required there (to output additional product information).

Describe the solution you'd like Dispatch the existing event \Extcode\Cart\Event\CheckProductAvailabilityEvent e.g. when restoring the cart session or in \Extcode\Cart\Controller\Cart\CartController::showAction.

dahaupt avatar Sep 28 '22 12:09 dahaupt