[ic] subtotal_nodisc

Kevin Walsh kevin at cursor.biz
Fri Apr 8 08:43:59 EDT 2005


Jon Jensen [jon at endpoint.com] wrote:
> On Fri, 8 Apr 2005, Salvador Caballe wrote:
> > I try to use the [subtotal_nodisc] usertag by Kevin  Walsh
> > it runs OK with 5.3.0 but  not with IC 5.3.1 version,
> > 
> > does any one know how to fix it?
> > 
> > 	my $save = delete $Vend::Session->{discount};
> > 	my $subtotal = Vend::Interpolate::subtotal();
> > 	$Vend::Session->{discount} = $save if $save;
> >
> Probably replace the above with:
> 
>      my %save = %$::Discounts;
>      my $subtotal = Vend::Interpolate::subtotal();
>      %$::Discounts = %save if %save;
> 
Remember to clear out the discount space as well:

    my %save = %$::Discounts;
    undef $::Discounts;

    my $subtotal = Vend::Interpolate::subtotal();
    %$::Discounts = %save if %save;

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/



More information about the interchange-users mailing list