Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default [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
    Code:
    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.

    2. Line 2044 of zen-cart-v150-full-release-20111230\zc_install\sql\mysql_zencart.sql
    Code:
    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.

    3. 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

    Code:
    INSERT INTO countries VALUES (13,'Australia','AU','AUS','1');
    Should be

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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 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/c...2d0ab0157bff7d
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: address format table comma

    Thanks for update.

 

 

Similar Threads

  1. Replies: 9
    Last Post: 7 May 2016, 06:39 PM
  2. Replies: 0
    Last Post: 25 Nov 2013, 02:32 PM
  3. v151 How to stop users entering comma's into address fields
    By petsupplies4u in forum General Questions
    Replies: 5
    Last Post: 7 Nov 2013, 07:02 AM
  4. address format different on checkout page vs address book
    By ladyhypnotist in forum General Questions
    Replies: 2
    Last Post: 22 May 2009, 04:13 PM
  5. Replies: 8
    Last Post: 1 Apr 2009, 05:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR