MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

bug in [item-discount] and workaround



[item-discount] appears to return the difference between
the price for a single item and the discount-price for the quantity
currently ordered - whereas I think the intention is 

       quantity ordered times the normal price 
	minus
	discount-price for that number of items

My workaround is to avoid using item-discount and to use this:

[currency][calc][item-quantity] * [item-price noformat] - 
  [discount-price noformat][/calc][/currency] 


Note: I dont have separateitems set - the problem only arises
if the quantity is > 1 for a given item in the cart.
Brian.
PS
The fixed expression in Interpolate.pm :

sub item_discount {
        my($code,$price,$q) = @_;
        return ($q * $price) - discount_price($code,$price,$q);
}




Search for: Match: Format: Sort by: