[ic] Shipping from multiple origins/zones
Bruno Cantieni
bruno at digi-land.com
Thu Jul 20 12:01:52 EDT 2006
> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org
> [mailto:interchange-users-bounces at icdevgroup.org] On Behalf
> Of Mike Heins
> Sent: July 20, 2006 9:53 AM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] Shipping from multiple origins/zones
>
> Quoting Bruno Cantieni (bruno at digi-land.com):
> >
> > This fails miserably with e.g.:
> > Shipping '018' lookup called, no zone defined
> > Shipping '079' lookup called, no zone defined
> >
> > Looking at the code in Ship.pm which is the cause of this:
> > unless (ref $Vend::Cfg->{Shipping_zone}{$code}) {
> > logError("Shipping '%s' lookup called, no zone defined",
> > $code);
> > return undef;
> > }
> > I can see why it wouldn't get past this, the question is
> how can I get this
> > to actually work?
> > Am I just barking up the wrong tree here (i.e. there's a
> better way and I
> > don't see it).
> > Any suggestions appreciated.
>
> You need to either 1) read the zone if it doesn't exist, or 2) write a
> shipping.asc that incorporates all zones. The routine to read the zone
> is not broken out in Vend::Ship -- you would need to read the
> source and
> duplicate it (perhaps as a UserTag or GlobalSub). A competent IC
> consultant could easily do that if required.
>
> --
> Mike Heins
Thank you Mike.
I had actually come to the same conclusion :(
I have gone ahead and written 2 new UserTags to support this.
1) read_zone which reads the zone files.
2) make_three to support read_zone.
I've modified the drop_ship_internal_lookup to build me a %zones hash that
can be passed to read_zone.
The thing works like a charm :)
Will supply code to list if interested.
Bruno Cantieni
###########################################
Digital Landscape - Cyboretum.com
Web Applications * Web Hosting * e-Commerce
http://www.digi-land.com
http://www.cyboretum.com
bruno at digi-land.com
Phone/Fax: 1+905.668.2255
Toll free: 1+877.668.2345
More information about the interchange-users
mailing list