[ic] subtotal_nodisc

Mike Heins mike at perusion.com
Fri Apr 8 09:08:30 EDT 2005


Quoting Kevin Walsh (kevin at cursor.biz):
> 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;

I think you need to do:

	%$::Discounts = ();

Otherwise the reference will be re-created with unpredictable
results.

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

For a successful technology, reality must take precedence over public
relations, for Nature cannot be fooled. -- Dick Feynman


More information about the interchange-users mailing list