[ic] Discount tag bug?

Mike Heins mike at perusion.com
Wed Aug 6 14:34:14 UTC 2008


Quoting Music (music at labyrinth.net.au):
> I am setting a discount on items by minusing a specific amount from a data 
> table.
> 
> [discount [loop-code]] $s - [loop-data merchandising 
> newdiscountfield][/discount]
> 
> This works very well while there is only one item in the cart however as 
> soon as quantity is set to more than one the discount fails with only a 
> discount for one item being applied.
> 
> Example:
> Item Price is $9.95
> 
> After the discount tag is applied  (in this example -1.00) the item price is 
> set to $8.95
> 
> However if the quantity for this item is increased to two items then the 
> sub-total is $18.90   (still only $1 discount)
> 
> Is this a bug or am I missing something?
> 

It's a bug in your code. 8-)

    [discount [loop-code]]
	$s - $q * [loop-data merchandising newdiscountfield];
    [/discount]
 

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

People who want to share their religious views with you
almost never want you to share yours with them. -- Dave Barry



More information about the interchange-users mailing list