[ic] Limit shipping by product

Joe D. Trent interchange-users@icdevgroup.org
Tue May 13 16:17:01 2003


Steve,

This code is from our checkout.html file. We have four freight alternatives:
Con-Way (LTL motor freight) and UPS 3day, ground and residential. There are
two categories of items that cannot be shipped by UPS. If an item in the
cart belongs to one of the categories, the other methods are discarded and
Con-Way is forced.

-------------------------------------------------------------------------
[comment]       Set initial shipping mode, and remove non-conway
                        modes when Spider Gang Assemblies are ordered.
                JDT added code for Cultivator Disc Gangs 2/3/3
[/comment]

[tmp shipmodes][data base=country field=shipmodes key='[default country
US]'][/tmp]
[item-list]
        [calc]
                my $cat = q{[item-field category]};
                my @modes = split /\s+/, $Scratch->{shipmodes};
                if ( $cat eq 'Spider Gang Assemblies' ) {
                        $Scratch->{shipmodes} = $Values->{mv_shipmode} =
'CON-WAY';
                }
                elsif ( $cat eq 'Cultivator Disc Gangs' ) {
                        $Scratch->{shipmodes} = $Values->{mv_shipmode} =
'CON-WAY';
                }
                else {
                        $Values->{mv_shipmode} = shift @modes unless
$Values->{mv_shipmode};
                }
                return;
        [/calc]
[/item-list]

------------------------------------------------------------------

I plan to add a field to the products file someday to allow me to specify
individual items. Of course John Fogerty says, "Someday never comes."

Hope this helps.

Joe D. Trent
Bigham Brothers, Inc.
Lubbock, Texas

----- Original Message -----
From: "Steve Hurley" <steveh@mwahosting.com>
To: <interchange-users@icdevgroup.org>
Sent: Tuesday, May 13, 2003 11:24 AM
Subject: [ic] Limit shipping by product


> How would I go about limiting the shipping method based on the product?
>
> There are a few items that can only be shipped UPS next day and I would
like
> to be able to not show UPS Ground or UPS Two Day as the Shipping Methods
on
> the checkout.
>
> Fairly new at this and thanks,
>
> Steve
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>