1and1 Help Centre Categories

print article

How to give discounts for certain item quantities

If you want the item price to be determined by the ordered quantity please follow these instructions:

Create an attribute for the item, e.g. originalprice and assign the item price as
its value. For eg: if the item costs £75.00, the "originalprice" value will be 75.
Follow FAQ How to create attributes for item rulesThen you need to write a rule. (Items -> New/Edit -> Next -> Rule (valid PHP-
Scriptcode, double quotes are not permitted!) for this item. Check FAQ Where to enter Item Rules if (article_get_field('count') >= 10)
article_set_field('price',article_get_field('originalprice') * 0.95);
elseif (article_get_field('count') >= 5)
article_set_field('price',article_get_field('originalprice') * 0.97);

Please note:
In the above example, a customer ordering between 5 to 9 pieces will get 3% discount and anything above/including 10 will get 5% discount. No discount will be given for a quantity lower than 5.