
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
Re: [ic] shipping idea
At 10:16 AM 11/29/2001 -0600, you wrote:
>I am trying to set the shipping cost based on the size of the items.
>
>I have read the following from the archieves for the shipping.asc:
>
>usps Mail [item-accessories size] 0 1 5
>usps Mail [item-accessories size] 2 2 7
>
>
>small = $5.00
>medium = $7.00
>I am wondering if there is a way to chain or loop this to go throught the
>whole cart?
>
>So if the customer buys two small he gets charged $10.00 not $7.00.
>
>I have read a hundred different ways to do this. Would like to know the
>correct way to get this output.
>
>Redhat 7.1 and interchange 4.8.3 (rpm)
>
>Thanks,
>rick
There are probably more than 100 :-)
One way would be to use the free-form method for shipping.asc:
usps: Mail
criteria <<EOC
[calc]
my $total = 0;
[item-list]
$total += ([item-quantity] * 5) if q{[item-modifier size]}
=~ /^s/i;
$total += ([item-quantity] * 7) if q{[item-modifier size]}
=~ /^m/i;
[/item-list]
return $total;
[/calc]
EOC
min 0
max 999999
cost f @@TOTAL@@
- Ed L.
===============================================================
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
===============================================================
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users