on 10-30-2018 6:10 PM
As a User, I should be able to add a minimum of 1 and a maximum of 99 of any single product to cart. How to add this functionality.
You can write your validation by overriding validateAddToCart
method of DefaultCommerceAddToCartStrategy
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Overwrite getForceInStockMaxQuantity method of DefaultAbstractCommerceCartStrategy and set it to 99. That will reset the quantity to 99 if user enter anything greater than 99.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I am not wrong, There will be an attributes called minOrderQuantity and maxOrderQuantity at Product Level. I think your requirement can be fulfilled by setting the values as 1 and 99 to those attributes. If it is fulfilled, you can run a batch script to update for all the products in your catalog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
there is no out of the box feature for this. write an interceptor and call while add or updating the cart. if more than 99 products added then display the appropriate message on the cart page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.