On 9/1/2021 at 12:27 PM, zon3d said:This is how I made it so that you can limit the total quantity of items allowed to be added to the cart out of specified Product IDs (eg: all the ones in a particular category).
Hi
After couple changes in your published code I've managed to limit all products of the same type in cart to a fixed value.
Works tremendously, but that's one of needed changes to implement to make it fully working.
In next step I need to hide that + - buttons but that's an easy peasy thingy.
The problem I'm facing is a notice in modal window after adding the product that mentions: "Product successfully added to your cart".
Do you have any ideas how could I change content of this notice, or even better disable the cart button once a visitor adds the product to cart?
I checked the function that blocks the button after raising the product's quantity over its stock value, but that's not so easy to trigger as I thought.
edit: k, I've found a great tutor solving my problem in 100%
those interested in solution might find it on below page:
myprestamodules.com/blog/prestashop-17/mark-product-is-already-in-cart-in-prestashop-17.html