[ic] Size based shipping

Rick Eicher II interchange-users@interchange.redhat.com
Mon Dec 3 11:44:00 2001


I am trying to make shipping to be based on the size of the items.

I have looked throught the archives and spent time in the IRC chat. I have
tried many different ways to make this work. I am now trying to use a
usertag to make this work.

I have a shipping.asc file of:

FLATD   Standard        price   0       0       e No thing to ship
FLATD   Standard        price   0       9999999 f [ship]

I have a usertag defined in the catlog.cfg:

#==========================================================================#

#Shipping user tag

UserTag ship Routine <<EOF
sub{
package Vend::Interpolate;
my $total =0;
[item-list]
if ([item-modifier size] =~ /^s/i) {$total += ([item-quantity] * 8.95);}
if ([item-modifier size] =~ /^m/i) {$total += ([item-quantity] * 9.95);}
if ([item-modifier size] =~ /^l/i) {$total += ([item-quantity] * 10.95);}
if ([item-modifier size] =~ /^xl/i) {$total += ([item-quantity] * 11.95);}
[/item-list]
return $total;
}
EOF

#==========================================================================#


When i load an item into the cart it gives me a shipping cost of
$154,792,564.00 for a medium
and $154,792,620.00 for a large. Now while i plan to retire someday I do not
think I will get many sales on this site.:)

So what have I done wrong? lol To me the code looks write but I know that
one can not proof read there own essay.

I am useing redhat 7.1 and interchange 4.8.3(rpm). Not that that will matter
much.

Thank you for your time,
Rick Eicher II
www.pbol.net