Tags/topics: 
1
Answers
Vote up!
0
Vote down!

How to limit maximum quantity to 1 for one given product type ?

Hi,

We sell PDFs online. Visitors can buy a printed / shippable version. In that case they must be able to select a quantity. But they can also choose to buy a downloadable version. In that case we want to enforce a maximum quantity of 1 for example if the visitors click several times on the add to cart button...

Printable / shippable is one product type, Downloadable is another one.

I am trying to use Rules to do that but for now haven't had any success...

How would you do it ?

Thank you

on May 6, 2013

1 Answer

Vote up!
0
Vote down!

So, I finally made it work so here is the answer:

Event: After udpdating an already existing line item

Conditions:
1/ data comparison: commerce-line-item:type = product
2/ data comparison: commerce-line-item:commerce-product:type = Your given product type
3/ data comparison: commerce-line-item:quantity is greater than 1

Action:
- set data value: commerce-line-item:quantity 1
- display custom message

Posted: May 6, 2013

Comments