[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] Manipulating shipping total from ups lookup in 4.6.5
Sorry about that...here's the complete message:
At 09:52 PM 06/06/2001 -0400, you wrote:
>Quoting Ed LaFrance (edl@newmediaems.com):
> > Hi All -
> >
> > Does anyone know any easy way to manipulate the shipping amount from a
> > ups-style lookup after the fact (i.e. - subtract a fixed amount from the
> > shipping, reduce it by a percentage, etc)? Ideally I would like something
> > like the [assign] tag in 4.7.x, but this particular cat is 4.6.5 and
> > upgrading is not a good option right now.
> >
> > The shipping docs mention something about appending some calcs to the
> > lookup with @@COST@@, but there are scant examples and I have not been
> able
> > to get it to work. \
> >
>
>You can set the adder. The eighth field in a tab-separated line is the options
>field, and it can be a hash reference. (The sixth field is the cost field,
>so there needs to be a tab between that and the options field.) It can contain
>something like:
>
> { adder => '@@TOTAL@@ * .05' }
>
>That will add 5% to the calculated cost.
Thanks, Mike. FWIW to whomever might be listening, you can reference the
scratch variable hash (and no doubt other data structures as well) in the
adder, allowing dynamic control over the adjustment, which is where I was
ultimately headed with this (here's a contrived example):
On some catalog page:
[if something_is_true]
[set shipping_adder]-2[/set]
[else]
[set shipping_adder][/set]
[/else]
[/if]
In shipping.asc:
{ adder => '$Scratch->{shipping_adder}' }
...allows you to conditionally take $2 off of the shipping charges.
- Ed L.
>--
>Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH 45013
>phone +1.513.523.7621 <mheins@redhat.com>
>
>Fast, reliable, cheap. Pick two and we'll talk. -- unknown
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users
===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@newmediaems.com
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================