From 84fa358b56b89205fff99927080d5c28c01d57ff Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 9 Nov 2012 17:03:41 -0800 Subject: various customer location-related fixes, #13763 --- httemplate/misc/xmlhttp-address_standardize.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'httemplate/misc/xmlhttp-address_standardize.html') diff --git a/httemplate/misc/xmlhttp-address_standardize.html b/httemplate/misc/xmlhttp-address_standardize.html index f53c35fca..e28c06f3a 100644 --- a/httemplate/misc/xmlhttp-address_standardize.html +++ b/httemplate/misc/xmlhttp-address_standardize.html @@ -16,8 +16,15 @@ my %old = %{ decode_json($cgi->param('arg')) } my %new; -foreach my $pre ( '', 'ship_' ) { - next unless ($pre || !$old{onlyship}); +my @prefixes; +if ($old{onlyship}) { + @prefixes = ('ship_'); +} elsif ( $old{same} ) { + @prefixes = (''); +} else { + @prefixes = ('', 'ship_'); +} +foreach my $pre ( @prefixes ) { my $location = { map { $_ => $old{$pre.$_} } -- cgit v1.2.1