Zen Cart Logo
Forums / Bug Reports / [Done v1.6.0] address format table comma

[Done v1.6.0] address format table comma

Views: 1,858

Results 1 to 4 of 4
6 Jul 2012, 2:56 AM
#1
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,017
Plugin Contributions:
2

[Done v1.6.0] address format table comma

  1. Lines 2043-48 of zen-cart-v150-full-release-20111230\zc_install\sql\mysql_zencart.sql
INSERT INTO address_format VALUES (1, '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country','$city / $country');
INSERT INTO address_format VALUES (2, '$firstname $lastname$cr$streets$cr$city, $state    $postcode$cr$country','$city, $state / $country');
INSERT INTO address_format VALUES (3, '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country','$state / $country');
INSERT INTO address_format VALUES (4, '$firstname $lastname$cr$streets$cr$city ($postcode)$cr$country', '$postcode / $country');
INSERT INTO address_format VALUES (5, '$firstname $lastname$cr$streets$cr$postcode $city$cr$country','$city / $country');
INSERT INTO address_format VALUES (6, '$firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country','$postcode / $country');

Are the above incidences of the word " comma " OK, or should they be replaced by " ',' " in sql code, or unquoted "," in the address_format table.

  1. Line 2044 of zen-cart-v150-full-release-20111230\zc_install\sql\mysql_zencart.sql
INSERT INTO address_format VALUES (2, '$firstname $lastname$cr$streets$cr$city, $state    $postcode$cr$country','$city, $state / $country');

Australia only needs a space or two, but not AFAIK a comma, after $city.

  1. Also Line 31 of zen-cart-v150-full-release-20111230\zc_install\sql\mysql_utf8.sql and
    Line 28 of zen-cart-v150-full-release-20111230\zc_install\sql\mysql_latin1.sql
INSERT INTO countries VALUES (13,'Australia','AU','AUS','1');

Should be

INSERT INTO countries VALUES (13,'Australia','AU','AUS','2');

Thanks

6 Jul 2012, 3:02 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.6.0] address format table comma

$statecomma is VERY INTENTIONAL, and should not be changed. It refers to a variable name. Changing that will break overall normal functionality.

Disclaimer for advice to future readers of this discussion:
If you make any of those changes, THEY ARE ONLY SUITABLE FOR YOUR SPECIFIC SITE, and NOBODY ELSE SHOULD EVEN CONSIDER TOUCHING THOSE COMPONENTS. Arbitrarily changing address-format data may result in shipping, delivery, taxation, and other problems for your customers.

29 Aug 2013, 4:40 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.6.0] address format table comma

Clarification: The report of the address-format being incorrect for Australia is valid.
But the proposed fix is invalid, since it destroys correct formatting for other countries like US/Canada.

A proper fix is included in v1.6.0 by adding a new format record and setting Australia to use that.
See: https://github.com/zencart/zencart/commit/c128b7d3da3a5a0bd38ac7d0752d0ab0157bff7d

29 Aug 2013, 9:32 PM
#4
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,017
Plugin Contributions:
2

Re: [Done v1.6.0] address format table comma

Thanks for update.