[interchange-cvs] interchange - pajamian modified 2 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Wed Aug 13 04:52:30 UTC 2008


User:      pajamian
Date:      2008-08-13 04:52:30 GMT
Modified:  .        Tag: STABLE_5_6-branch WHATSNEW-5.6
Modified:  dist/standard/include/checkout Tag: STABLE_5_6-branch
Modified:           initialization
Log:
Provide reasonable defaults for shipping mode and country at checkout to avoid "not enough information" errors.

Revision  Changes    Path
No                   revision



No                   revision



2.1.2.7              interchange/Attic/WHATSNEW-5.6


rev 2.1.2.7, prev_rev 2.1.2.6
Index: WHATSNEW-5.6
===================================================================
RCS file: /var/cvs/interchange/Attic/WHATSNEW-5.6,v
retrieving revision 2.1.2.6
retrieving revision 2.1.2.7
diff -u -r2.1.2.6 -r2.1.2.7
--- WHATSNEW-5.6	16 Jul 2008 10:19:05 -0000	2.1.2.6
+++ WHATSNEW-5.6	13 Aug 2008 04:52:30 -0000	2.1.2.7
@@ -33,6 +33,9 @@
 * Disabled product comment to prevent spam showing up on default
   installations.
 
+* Provide reasonable defaults for shipping mode and country at checkout to avoid
+  "not enough information" errors.
+
 
 ------------------------------------------------------------------------------
 



No                   revision



No                   revision



1.1.1.1.4.1            interchange/dist/standard/include/checkout/initialization


rev 1.1.1.1.4.1, prev_rev 1.1.1.1
Index: initialization
===================================================================
RCS file: /var/cvs/interchange/dist/standard/include/checkout/initialization,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.4.1
diff -u -r1.1.1.1 -r1.1.1.1.4.1
--- initialization	25 Apr 2004 17:07:49 -0000	1.1.1.1
+++ initialization	13 Aug 2008 04:52:30 -0000	1.1.1.1.4.1
@@ -11,11 +11,23 @@
 	return $Scratch->{old_browser} ? 'Not a DHTML browser' : 'DHTML browser';
 [/calc] -->
 
-[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
 	$Values->{mv_order_profile} ||= $Variable->{DEFAULT_PAYMENT_MODE}
 								||'credit_card';







More information about the interchange-cvs mailing list