[ic] shipping criteria question
Nathan Barnett
nbarnett at specialty-books.com
Fri Aug 20 09:19:25 EDT 2004
I found my solution. To complete this thread I will paste the working
solution.
I only edited the shipping.asc file. Everything else can stay the same.
GNDRES: UPS Ground
criteria <<EOF
[calc]
my $total = 0;
[item-list]
$total += [item-quantity];
[/item-list]
return 'quantity' if $total < '7';
return 'weight' if $total > '6';
return 'weight';
[/calc]
EOF
min 0
max 0
cost e Nothing to ship!
min 1
max 6
cost 6
min 7
max 149
cost u
table Ground
zone rates/457
geo zip
default_geo 45701
adder 3
min 150
max 9999
cost e @@TOTAL@@ lbs is to heavy for UPS
On Wed, 2004-08-18 at 13:10, Nathan Barnett wrote:
> On Wed, 2004-08-18 at 12:39, rbragg wrote:
> > Nathan Barnett wrote:
> > > I am looking to set up shipping so that it will use a flat rate when the
> > > total items in the cart are less than 7 and use weight based shipping
> > > when the items are more than 6. For this I was thinking to set up each
> > > ship method with more than one criteria.
> > >
> > > This is what I was thinking but its not working. I was hoping that if
> > > the first didn't match it would go down to the next until a match was
> > > found.
> > >
> > > GNDRES: UPS Ground
> > > criteria quantity
> > > min 0
> > > max 0
> > > cost e Nothing to ship!
> > >
> > > criteria quantity
> > > min 0
> > > max 6
> > > cost 6
> > >
> > > criteria weight
> > > min 7
> > > max 150
> > > cost u
> > > table Ground
> > > zone rates/457
> > > geo zip
> > > default_geo 45701
> > >
> > > criteria weight
> > > min 150
> > > max 9999
> > > cost e @@TOTAL@@ lbs is to heavy for UPS
> > >
> > >
> > >
> > > Thanks in advance
> > >
> > > -nate-
> > >
> >
> > Hi,
> >
> > the "criteria weight, min 7" means that an item must "weigh" 7 or more
> > pounds. I think you need to put an if statement in your checkout page to
> > test how many items in the cart, then if < 7, use the quantity method,
> > and if > 7, use a weight based method. Also the min's should probably be
> > 1 for these methods.
> >
> > Rick
> >
> >
> > _______________________________________________
> > interchange-users mailing list
> > interchange-users at icdevgroup.org
> > http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
> Thanks for the reply.
>
> If I change the first criteria to weight the min and max reflect the
> weight. As I have it now with the criteria as quantity, the min and max
> reflect the total number of items in the cart. It seems that the ship
> method uses the first instance of criteria for that entire method (based
> on my trial and error).
>
> I was hoping I could do this with one ship method. Maybe I should put
> some logic in my store that chooses UPSGND_WGT or UPSGND_QTY and have
> only one shipping criteria for each of those methods? If items are less
> than 7 choose UPSGND_QTY and it will have a flat rate. If items are
> greater than 7 choose UPSGND_WGT and use the rate tables.
>
> Any other thoughts?
>
> Thanks
> -nate-
--
Nathan M. Barnett
Manager of Information Systems
Specialty Books, Inc.
6000 Poston Road
Athens Ohio, 45701
Tel: 800.466.1365 x262
Fax: 800.466.7132
Email: nbarnett at specialty-books.com
WWW: http://www.specialty-books.com/
More information about the interchange-users
mailing list