Tuesday, 28 May 2013

Magento - prevent adding the same sku twice or more

Magento - prevent adding the same sku twice or more

I want to prevent users from adding the same product twice or more (in backend as well as frontend), whilst not restricting them from ordering as many items as they want.
For example, given there's a product with the SKU ABCD123 - how do I prevent the user from adding it twice into the cart? Instead allow the user to add it once and let them update the ordered qty instead?
I had a look at this How to prevent adding same product to cart more then one time in magento; however the solution suggested refers to restricting total number of items in cart or updating every product with a certain inventory config.
Is there a way to do this differently by modifying the cart code?

No comments:

Post a Comment