[ic] Discount ALL_ITEMS - bug ?

=?iso-8859-1?q?James=20Griffiths?= griffiths_james@yahoo.com
Tue, 2 Jan 2001 09:05:46 -0800 (PST)

Hello All,

I have set up a test store which uses the 
[discount ALL_ITEMS] tag to apply a flat percentage
discount across the catalog.

The store is an instance of the "Construct Something"
demo and the [discount ....] tag is on the cart 
component in templates/components. The version is

The problem I have is that when viewing the cart,
the line items are shown un-discounted while the
sub-total reflects the correctly discounted amounts.

I think I have tracked this to some lines in the
sub conditional in Interpolate.pm  :

       elsif($base eq 'discount') {
               $CacheInvalid = 1;
               $op =  
               $op = "q{$op}" unless defined $noop;
               $op .=  qq%     $operator $comp%
                                if defined $comp;

The ALL_ITEMS attribute of the discount tag creates
a key value of ALL_ITEMS in the discount hash in the
Session structure. However, the product SKU ($term 
above) does not appear in the discount hash and so
the product does not appear to be discounted. Other
parts of the discount code (subs apply_discount and
discount_price) appear to make special allowances
for the ALL_ITEMS case. 

Any feedback much appreciated,
James Griffiths

Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!