[ic] [shipping]

Steve Graham interchange-users@icdevgroup.org
Sun Jul 14 12:19:02 2002


>From: "Kevin Walsh" <kevin@cursor.biz>
>Reply-To: interchange-users@icdevgroup.org
>To: <interchange-users@icdevgroup.org>
>Subject: RE: [ic] [shipping]
>Date: Sun, 14 Jul 2002 16:34:50 +0100
>
> >
> > The way I understang the [shipping] tag: if you use this tag in 4.8.5 it
> > will send a request to UPS to get the current default shipping amount.
> > Is there a way to get the current value without fetching the information
> > from UPS? In otherwords, is the last value of shipping stored in a 
>session
> > variable somehow?
> >
> > I need to test the last value received from UPS without sending another
> > request to UPS.
> >
>You could call the [shipping] tag once, store the result in a
>temporary scratch variable and then display that scratch on your
>page as many times as you see fit:
>
>     [tmp postage][shipping][/tmp]
>     Postage cost: [scratch postage]<br>
>     Repeated for the hard of hearing: [scratch postage]<br>
>
>If you wanted to store the value in the session as a persistent,
>rather than as a temporary, scratch then you could use [seti]
>instead of [tmp].
>

That is probably what I need to do. I noticed that [shipping] is called 
twice on checkout.html (once on the totals section at the top of the page, 
then again on the selct box for more shipping options later in the page), it 
is also called in receipt.html, mail_receipt, report, and maybe somewhere 
else, I'll have to dig into it a little deeper. Seems to me that once the 
placce order button is called then we need to use the value of [shipping] at 
that moment and not call it again. I changed the action of the mv_shipmethod 
to automatically recalculate if it is changed.

If [shipping] fails on any of these requests then the information returned 
will be incorrect, even after the place order is clicked. I had this happen 
Saturday night, the information returned from UPS was being very a little 
unpredictable (on three seperate recalculate clicks I got 
gndcom,threeday,2day,nextday then clicked recalculate again I just got 
options fo 2day, and next day) the admin order information showed the 
correct s&h amount, but the email order sent to me showed a vlaue of zero. 
We have received many orders since launching the website a few months ago, 
so the only problem I can attibute this too is the constant calling of 
[shipping].

Maybe I need to adjust the time-out delay for information returned from 
Business::UPS  -  Would this help?

Thanks,
Steve

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com