[ic] Weirdness with discount tag

Joshua Lavin joshua at kingdomdesign.com
Mon Nov 17 17:08:55 EST 2003

On Monday, November 17, 2003, at 04:02  PM, Ed LaFrance wrote:

> At 02:44 PM 11/17/2003 -0600, you wrote:
>> IC 4.9.8-20030915
>> The shopping cart is not displaying the correct price-each or 
>> subtotal when using discounts if you order more than 1 item. It works 
>> fine as long as the quantity is 1, but when it is 2 or more, the 
>> discounted price-each gets divided by the quantity, and the subtotal 
>> equals that times the quantity (correct behavior).
>> The discount is applied on the flypage, and is to equal the SalePrice 
>> field in my database:
>> [discount [item-code] interpolate=1]
>> my $t = [item-field SalePrice];
>> return $t;
>> [/discount]
>> The cart is using:
>> [if discount [item-code]]
>> [discount-price] (for price-each)
>> [item-discount-subtotal] (for extended price)
>> [else]
>> [item-price]
>> [item-subtotal]
>> [/else]
>> [/if]
>> I have a test site here:
>> http://www.shopalert.us/shop_dev/nogreaterjoy.html
>> This page has links to the flypages, which apply the discount. For 
>> this particular sale, everything is 25% off, so I've also tried 
>> applying the discount on the flysale-audio.html and 
>> flysale-videos.html pages with:
>> [discount [item-code]] $s * .75 [/discount]
>> This works if you type in the quantity and then hit "Add to cart." It 
>> also works if you order 1 and then change the quantity in the cart 
>> and recalculate. The problem starts if you go back to the sale page, 
>> and buy a different item. When the cart comes up, the first item's 
>> price-each equals the discounted price each divided by the quantity.
>> I am baffled by this. Any suggestions?
>> Thanks,
>> Josh
> Josh -
> This worked fine for me...
> - Ed


Thanks for taking a look. Did you happen to use the back button to 
return to the sale page?

After some further testing, I found that buying audio tapes and 
changing quantity in the cart or on the flypage worked. If I used the 
back button to return to the sale page, and added more audio tapes, the 
quantities were still fine. It was only when I hit "continue shopping" 
or entered the sale page URL in the browser that the discounts got 
messed up.

Maybe I should change "continue shopping" to a javascript history 


More information about the interchange-users mailing list