How do I limit cart2 to qty of 1 per product

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

How do I limit cart2 to qty of 1 per product

Post by blackrain »

I want to limit the quantity of items per SKU

e.g A user clicks on a product twice, and the cart only accepts 1 not 2 of the same product.

I want to limit users but querying the cart to see if the cart os holding a sku the turn the 'add item' button for that specific product off or disable it.

thanks
User avatar
iturbay
Forum Members
Forum Members
Posts: 85
Joined: Mon Sep 29, 2014 5:38 am

Re: How do I limit cart2 to qty of 1 per product

Post by iturbay »

after clicking on the add to cart button using javascript add the disable attribute to it
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

Re: How do I limit cart2 to qty of 1 per product

Post by blackrain »

In the first instance javascript offers a solution that works well for double click, but I am looking for a more logic based approach that looks at the items in the basket, then disables the button of the relevant products.

If I used javascript alone the buttons would be re-enabled on refresh or page load.

Thanks for the suggestion.
Post Reply

Return to “Modules/Add-Ons”