[ic] Errors when trying to use state for shipping selection

Mike Heins mike at perusion.com
Fri Dec 12 11:31:19 EST 2003


Quoting Chris Bair (interchange at tssphoto.com):
> I'm running into some errors when I try to restrict different 
> shipping modes based on the sate. I have the different shipping modes 
> in the shipmode column in the state table using spaces to separate 
> them, just like you do in the country table. The error I'm getting 
> looks like this:
> 
> Runtime error: Can't locate object method "single" via package 
> "Vend::Table::GDBM" (perhaps you forgot to load "Vend::Table::GDBM"?) 
> at /home/inkjet/interchange/lib/Vend/Ship.pm line 429.
> 
> and the code for the shipping selection looks like this:
> 
>          <SELECT NAME=mv_shipmode>
>           [shipping
>             label=1
>             mode=|[data table=state key='[default state UT]' col=shipmodes]|
>           ]
>           </SELECT>
> 
> although I have also tried:
> 
> 	<select name=mv_shipmode>
> 	[loop list="[shipping possible=1]"]
> 	  <option value="[loop-code]"> [shipping-desc mode="[loop-code]"]
> 	[/loop]
> 	</select>
> 
> I started out on IC 4.8.7, tried it on 4.9.9 and my current test 
> server is running 5.0.0 RC2 just for kicks and giggles. I even 
> grabbed the current Bundle:Interchange and the kitchensink just in 
> case.
> 
> Has anyone out there been able to get this working or is it just a 
> broken feature that isn't ready for use yet?

You want SQL tables to do this, I think. As the number of GDBM users
dwindles, things are not often fully tested using that table type.
Any tag which uses SQL queries (as that one does).

I think we have to start putting a "requires SQL" in some cases.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295      <mike at perusion.com>

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer


More information about the interchange-users mailing list