[ic] Passing "cart" parameter from shipping tag

Jon Jensen jon at endpoint.com
Sat Sep 4 15:25:16 EDT 2004


On Sat, 4 Sep 2004, Ron Phipps wrote:

> I have a shipping mode like this in shipping.asc:
> 
> FEIPC	FedEx Priority (1-3 days)	weight	0	0	e
> Nothing to ship!		{'PriceDivide' => "1",}
> FEIPC	FedEx Priority (1-3 days)	weight	0	99999	f
> [fedex-lookup-by-zip mode=FEIP country="[value country]" zip="[value
> zip]" weight="[cart-weight]" adder="2.75"]		{'PriceDivide'
> => "1",}
> 
> The weight parameter for my fedex-lookup-by-zip tag is passed from
> [cart-weight] which does the total of the cart based on the base weight
> and option weight.
> 
> Everything works well when the items are in the main cart.  The problem
> comes when I try to get the shipping total of a cart other then the main
> cart.  The reason it is a problem is because I have no way to pass the
> cart parameter from the shipping tag through shipping.asc to the
> cart-weight tag.
> 
> Is there a way to pass the cart parameter that is passed to the shipping
> tag to my cart-weight tag?

It's kind of kludgy, but would it be problem to change the current cart
in the shipping tag, then change it back when you're done? You can use 
[cart cart_name] to set the current cart, but I don't know offhand any way 
to get the current cart name except by reading $Vend::CurrentCart.

Jon


-- 
Jon Jensen
End Point Corporation
http://www.endpoint.com/
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...



More information about the interchange-users mailing list