Quoting Ed LaFrance (edl at newmediaems.com):
> At 04:25 PM 12/5/2003 -0700, you wrote:
> >I've seen a few references to the shipmode column in the
> >products/state.txt table. As I understand it, using this, I can specify
> >which ship modes to allow based on which state is selected (exclude ground
> >shipping to Hawaii and such). My question is, how exactly do I do this?
>> Simply populate the shipmode column with valid choices for each state, then
> modify the shipping selector code in include/checkout/shipping_address:
>> <SELECT NAME=mv_shipmode>
> [shipping
> label=1
> mode=|[data table=state key='[default state A_STATE_CODE]'
> col=shipmodes]|
> ]
> </SELECT>
>> A_STATE_CODE could be your state of origin or just about any other state
> that makes sense as a starting point, until they specify theirs.
Actually, in Interchange 5.0 you can get it automatically via:
[shipping widget=select]
That will give you the shipping modes valid for the current
shopping cart and values. In other words, you have to have
a state and country to get the modes; you have to have a ZIP
if by UPS, and if the criteria is weight you must have that
as well.
You can see the effect of some of these in the "mike" demo.
If you want all *possible* shipmodes for the country/state,
regardless of cart contents or zip, use:
[shipping possible=1]
That will give you a space-separated list of modes you
can loop over:
Select your default shipping mode:
<select name=mv_shipmode>
[loop list="[shipping possible=1]"]
<option value="[loop-code]"> [shipping-desc mode="[loop-code]"]
[/loop]
</select>
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 <mike at perusion.com>
Nature, to be commanded, must be obeyed. -- Francis Bacon