[ic] Passing "cart" parameter from shipping tag
Ron Phipps
rphipps at reliant-solutions.com
Sat Sep 4 15:06:37 EDT 2004
> From: interchange-users-bounces at icdevgroup.org
[mailto:interchange-users-
> bounces at icdevgroup.org] On Behalf Of Ron Phipps
> Sent: Saturday, September 04, 2004 11:45 AM
>
> Hello,
>
> 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?
>
> Thanks,
> -Ron
>
Of course I found the solution 15 minutes after posting this. The
solution was to replace the following in my usertag:
$Carts->{main}
with
$Vend::Items
The shipping tag saves what's currently in $Vend::Items to a temporary
variable. Then it pushes all the items that are in the carts specified
by the cart parameter in to $Vend::Items which can be used for
manipulation. Then at the end it overwrites $Vend::Items with what is
in the temporary variable.
Thanks,
-Ron
More information about the interchange-users
mailing list