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

Reqired products are added to cart without respect for ACL, Store Restrictions or even asking if the product is published #1244

Open
Michael-Herzog opened this issue Jan 10, 2025 · 3 comments
Assignees
Milestone

Comments

@Michael-Herzog
Copy link
Contributor

ShoppingCartService > AddRequiredProductsAsync

@mgesing
Copy link
Contributor

mgesing commented Jan 10, 2025

Avoidable. The admin specifies which product is required. It would therefore be a check to see if the admin has made a mistake in his configuration.

AddRequiredProductsAsync should not check anything, but only realize the configuration of the admin. Checks must only take place in the ShoppingCartValidator.

@Michael-Herzog
Copy link
Contributor Author

What about publishing dates where the shop admin can expect the dates will be automatically respected?

@mgesing mgesing added the review label Jan 13, 2025
@mgesing
Copy link
Contributor

mgesing commented Jan 14, 2025

Too much new validation code would have to be written for this. What should happen if, for one of the many possible reasons, the required product cannot be added? Then simply ignore the required product? Probably not... then, consequently, the original product should not be added to the shopping cart page either. An unsatisfactory situation that makes little sense. For the buyer, there is no way forward and it is unclear what the admin is trying to achieve. My suggestion: When specifying required products, a warning box is displayed that explains that required products must not be restricted in terms of availability and access.

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