[ic] Ship Default Country Not Working?

Josh Lavin josh-ic at att.net
Thu Mar 25 21:19:37 UTC 2010


On 03/25/2010 02:39 PM, IC wrote:
> Hi folks,
>
> In the current demo store I cannot change the ship default country on the
> checkout, the code reads:-
>
> [display name=country type=country_select value="[evalue country]"]
>
> With SHIP_DEFAULT_COUNTRY set to UK it still defaults to US.
>
> The variable is set ok, [var SHIP_DEFAULT_COUNTRY] prints UK.
>
> I also tried adding default="[var SHIP_DEFAULT_COUNTRY]" to the display tag
> but still no change in default shipping country, any ideas?

You might have an old include/checkout/initialization.

commit 7e242af7f7cc07e9098a382147c2a1763740448e
Author: Peter Ajamian <peter at pajamian.dhs.org>
Date:   Wed Aug 13 04:52:48 2008 +0000

     Provide reasonable defaults for shipping mode and country at 
checkout to avoid "not enough information" errors.

Download from here, or a quasi-patch is below:

http://git.icdevgroup.org/?p=interchange.git;a=blob_plain;f=dist/standard/include/checkout/initialization;hb=refs/heads/STABLE_5_6-branch

-[perl tables="products"]
+[perl tables="products country"]

         ## This section sets the shipping, handling, taxing, and payment
         ## initializations, as well as browser check

+
+       # Initialize country:
+       $Values->{country} ||= $Variable->{SHIP_DEFAULT_COUNTRY};
+
+       # Initialize shipmode:
+       if ($Values->{mv_shipmode} eq 'default') {
+               my $shipmode = $Tag->data('country', 'shipmodes', 
$Values->{country});
+               $shipmode =~ s/^\s+//;
+               $shipmode =~ s/\s.*//;
+               $Values->{mv_shipmode} = $shipmode;
+       }
+
         ## Start with payment mode if none there

-- 
Josh Lavin
Perusion -- Expert Interchange Consulting    http://www.perusion.com/



More information about the interchange-users mailing list