1and1 Help Centre Categories

print article

Price calculation for items based of special attributes in association with group discounts.

If you created a customer group that receives a discount and you also allocated
different prices based on different attributes (FAQ How to allocate different prices to an item based on a certain feature)
and now the discount is either not being considered, or else is being calculated
incorrectly.

Solution: Insert the following code at the end of the rule under Items
Check FAQ Where to enter Item Rules


if ($SHOP_CUSTOMERDATA[discount]> 0)
article_set_field('price', article_get_field('price')*(1-$SHOP_CUSTOMERDATA[discount]/100));
The discount will now be calculated correctly.