Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unavailable products from cart session #402

Open
dahaupt opened this issue Sep 28, 2022 · 0 comments
Open

Remove unavailable products from cart session #402

dahaupt opened this issue Sep 28, 2022 · 0 comments

Comments

@dahaupt
Copy link
Contributor

dahaupt commented Sep 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants