[ic] Size based shipping

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


> -----Original Message-----
> From: interchange-users-admin@interchange.redhat.com
> [mailto:interchange-users-admin@interchange.redhat.com]On Behalf Of Ed
> LaFrance
> Sent: Monday, December 03, 2001 12:27 PM
> To: interchange-users@interchange.redhat.com
> Subject: Re: [ic] Size based shipping
>
>
> At 10:55 AM 12/03/2001 -0600, you wrote:
> >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.
> >
>
> This looks suspiciously like some code I posted a week or so ago - though
> it was never intended to be used this way.  A little knowledge is indeed
> dangerous ;-).
>
> Try it this way and see if the shipping rate is a bit more reasonable:
>
> FLATD   Standard        [ship]   0       0       e No thing to ship
> FLATD   Standard        [ship]   0       9999999 f @@TOTAL@@ * 1
>
> - Ed L.
>

now with that i do not get a wrong calc i get "Note: No match found for mode
'FLATD', quantity '32.95', returning 0."