Adjust the quantity input values to certain products NOT all products
-
I need to set increment amount values to a few of the products in our shop, in other words products XYZ and ABC should only be sold in increments of 3, so if a user chooses two orders of product XYZ then 6 items should be added to their cart, if a users chooses three orders of product XYZ then 9 items should be added to their cart, so on and so forth, the function on the woothemes documentation from the link below gets this accomplished:
https://docs.woothemes.com/document/adjust-the-quantity-input-values/
however it does it for ALL products globally on the entire shop, i need to set a condition where the function above should only be applied to products XYZ and ABC in increments of 3 ONLY for both. Can someone help?
i am pretty sure that all that needs to be done is to simply add a condition on or around line 5 from the code above that states something like if product sku == XYZ || ABC etc. etc.
- The topic ‘Adjust the quantity input values to certain products NOT all products’ is closed to new replies.