Hello,
i have trouble with a simple cart-store (newest version of simplecard) and a fixed amount coupon. When i add a percent coupon everything inside the cart works fine. But when i add an fixed amount coupon the price calculation gets messed up:
Instead of just calculating the total price minus the discount, simplecart multiplies the amount of discount with the quantity of items. So the fixed amount works on one item in the cart. But if i have more than one item in the cart the fixed amount gets multiplied by the number of items in the cart. For example:
- 1 Item cost 10 EUR and i have a discount of 10 EUR: the total is 0 EUR
- 10 Items cost 100 EUR and i have a discount of 10 EUR: the total is still 0 EUR not 90 EUR
I found in line 1433 in “Cart.class.php” may the reason:
$totalDiscount = $priceDiscount['price'] * $products[$optKey]->totals['quantity'];
and changed it to:
$totalDiscount = $priceDiscount['price'];
That fixed the problem for the quantity. But when i have 2 different items in the cart the discount still gets multiplied by the amount of items.
Can someone help me to fix this issue?
Thank you very much.
nice regards
Jan