[ic] Creating custom shipping dropdown list (about old post by Michael Lehmkuhl)

Miguel Navarro interchange-users@icdevgroup.org
Mon Jan 20 02:05:01 2003


----- Original Message -----
From: "Paco Sánchez" <lists@e-civitas.com>
To: <interchange-users@icdevgroup.org>
Sent: Sunday, January 19, 2003 2:31 PM
Subject: [ic] Creating custom shipping dropdown list (about old post by
Michael Lehmkuhl)


> Hi, I need to specify different shipping methods for different items that
> are shipped by different vendors.
>
> Searching through the list archives I found an old post by Michael
Lehmkuhl
> about the exact same thing and a solution that he tried but did't seem to
> work 100%:
>
> ------------------ from old post ---------------------
>
> Here is the code that we are calling to generate the shipping dropdown:
> ###### CODE ord/checkout.html ######
> [item-list modular=1]
>
> # Other stuff in here...
>
> [seti currentvendor][item-field vendor][/seti]
>
> <SELECT NAME=mv_shipmode onChange="this.form.submit()" CLASS="styled">
> [seti vendormodes][data table=country key='[default country US]'
> col=shipmodes][/seti]
> [perl]
>
>     my @temparr = split(/[\s,]/,$Scratch->{vendormodes});
>     my $currentvendor = $Scratch->{currentvendor};
>
>     # Display only those shipping modes that match the vendor for this
> product.
>     @temparr = grep { m"^$currentvendor" } @temparr;
>
>     $Scratch->{vendormodes} = join(' ',@temparr);
>
> # Also tried this...
> #    $Values->{vendormodes} = join(' ',@temparr);
>
> [/perl]
>
> [shipping
>     label=1
>     mode='[scratchd vendormodes]'
> ]
> [comment]
> # Also tried this...
> [shipping
>     label=1
>     mode='[value vendormodes]'
> ]
> [/comment]
> </SELECT>
>
> # Other stuff in here...
>
> [/item-list]
> ###### CODE ######
>
> -------------------- end old post -------------------
>
> Of course this is done after creating a field at the products database
with
> the name "vendor" and identifying shipping methods by the vendor prefix:
> say we create vendor1 then an UPS shipping name for this vendor would be
> vendor1UPS.
>
> The problem is that it only works partially, and all shipping alternatives
> show in the dropdown list, including those only reserved for other
vendors.
>
> In case Michael is still around here, or anyone who has used this, I would
> appreciate some tips about making this work.
>
> Thanks in advance!
>
> Paco Sánchez
> http://pacosanchez.com
> mailto:psanchez%40pacosanchez%2ecom
> ICQ 101879542
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>


That is nice.. But where are you getting the shipping costs from? One
another note does anyone know where ord/checkout.html is configured to the
store? The checkout.html file I am using in storeid = 'store' is not the one
I see being displayed, the one being displayed is the foundation
checkout.html template.

M