Maximum order for all attributes of a product
Hi there,
I've read many answers here and can't seem to figure this out. I have a product that is available in 6 different languages. I don't want customers to order more than 4 total products, in any language. At the moment, I've set a rule to stop the customer from ordering 4 copies of a product in one language, but this doesn't translate to the total in all languages.
So for the moment, the customer can't order more than 4 English products. But they can order 4 English, 4 French, 4 Spanish.
I would like them to have a maximum total of 4 for the product in English, French or Spanish.
Is this possible?
Comments
thanks! I'm actually realizing that I can't even limit the number of items added to a cart on the add to cart form. Do you know how this can be done?
Sure! Did a little reading in the issue queue and found this gem: https://drupal.org/node/1658788 ... Turns out there really isn't a way in rules to stop a product from being added to the cart. Lots of options in the issue above, some have tried creating a rules condition "so many product A's are currently in cart" and a rules action "remove this item from the cart" ... which is counter intuitive to what commerce_stock does. Commerce_stock sets the price to NULL on products that should not be added to the cart. You could take that queue and build a pricing rule that sets the price to NULL if there are two many products in the cart --- but you would have to be careful that it only affected the product not in the cart, not all the products regardless of position in cart.
Good luck!