[ic] Weirdness with discount tag
Joshua Lavin
joshua at kingdomdesign.com
Mon Nov 17 14:44:06 EST 2003
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
More information about the interchange-users
mailing list