Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default Address format for Japanese...

    I may be going about this the wrong way, so any advice would be welcome.

    I have been looking through the various threads trying to find a way to make it easy to print address labels... I found this thread <http://www.zen-cart.com/forum/showthread.php?t=23421&highlight=Printing+address+labels> that has had no action.

    I am not a programmer so my easy solution would be to just copy and past the customer name and address from Admin/Customer/Orders...

    The problem is, on that page the layout for Japanese orders is not suitable at all...

    I found this thread that explains that it is possible to add different address formats to Admin/Location/Counties... <http://www.zen-cart.com/forum/showthread.php?t=16829&highlight=Printing+address+labels>

    I tried to make my own format by rearranging things but totally messed up. I would have thought it would be an easy thing to do but it just didn’t make sense to me... Here is what I need the format to look like...

    Country
    Postcode
    State
    Town
    Street Address 2
    Street Address
    Customer name

    Actually, Japanese addresses tend to be written on just two or three lines, like this:

    Country
    Postcode, State, Town, Street Address 2, Street Address
    Customer name

    If anyone could help out with modifying the code so it would suite either or preferably both of the above Japanese formatted address styles, I would be most grateful.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Address format for Japanese...

    for the second address format you mentioned, does this work?

    Code:
    INSERT INTO address_format VALUES (NULL, '$country$cr$postcode,$statecomma, $city, $suburb, $street$cr$firstname $lastname', '$country / $postcode');
    .

    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
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default Re: Address format for Japanese...

    Thank you Dr. Byte for your amazingly fast response...

    Yes, it appears to work, it made a new entry, No. 6... There was a minor formatting error, no space between the Post code and the State.

    I have added a space as in this one:

    INSERT INTO address_format VALUES (NULL, '$country$cr$postcode, $statecomma, $city, $suburb, $street$cr$firstname $lastname', '$country / $postcode');

    but I am wondering about uploading the new code that I have modifed?

    If I upload the slightly modified file, I take it that it will just make a new entry (no. 7). If that is so, I guess it would be better to delete the old one, but how do I go about doing that?

    Also, I am not sure how that one line long format will be handled for English speakers living in Japan who write their addresses in English. That is why I made two possible formats that will need to be tested...

    Using your example, I created this one:

    INSERT INTO address_format VALUES (NULL, '$country$cr$postcode$cr$statecomma$cr$city$cr$suburb$cr$street$cr$firstname $lastname', '$country / $postcode');

    Do you think it will fly?

    I am sorry to bother you with these troublesome questions...

    ( I should add for others reading this post that initially no changes showed up in the address area of Admin/Customers/Orders... I had to purchase a new product for the new format to appear. So, only orders placed subsequent to the change are affected )

  4. #4
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Address format for Japanese...

    but I am wondering about uploading the new code that I have modifed?

    If I upload the slightly modified file, I take it that it will just make a new entry (no. 7). If that is so, I guess it would be better to delete the old one, but how do I go about doing that?
    Running the statement again will produce another entry, so you might want to simply edit the settings in phpMyadmin ... edit record #6 (you mentioned) and paste the new format over the old one.

    Using your example, I created this one:

    INSERT INTO address_format VALUES (NULL, '$country$cr$postcode$cr$statecomma$cr$city$cr$sub urb$cr$street$cr$firstname $lastname', '$country / $postcode');
    the $cr are line-breaks and $comma are commas ... you may not want so many line-breaks as you have shown in this suggestion.


    So ... you will then have "6" and "7".... how are you going to decide which one is used?
    These address formats were designed based on international ISO standards for the sake of being universally accepted and valid. Granted, standards do change over time. However, these were not designed to be based on language, but rather based the standard used by the indicated country.
    .

    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.

  5. #5
    Join Date
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default Re: Address format for Japanese...

    Thanks Dr. Byte,

    I have changed it and thanks to your help I can now experiment with the different formats as need be.

    I had a hard time working out how to edit table 6 in phpMyAdmin, so for others who may need to do this, here is a brief explanation.

    I am not sure if this is the best way to do it but it worked for me.

    In phpMyAdmin, go the zen-cart database connected to your store. Click on the Search button in the main window. Type in ‘country’ (without the quotation marks) in the search field. Select All should be already highlighted, if it is not, click it. Then press Go.

    A long list will come up, and you should see something like the following:

    5 match(es) inside table zen_address_format

    Click on the Browse button in the corresponding column

    Find the entry you want to edit and click on the edit icon.

    Edit and Save...

  6. #6
    Join Date
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default Re: Address format for Japanese...

    Just realized that I had made a mistake with the address format, as the last name should be first... So here is the new format that I am now using:

    $country$cr$postcode$cr$state $city$cr$suburb $street$cr$lastname $firstname

 

 

Similar Threads

  1. address format
    By soxophoneplayer in forum Basic Configuration
    Replies: 2
    Last Post: 3 Apr 2010, 06:27 PM
  2. Address Format for Australia
    By lloyd_borrett in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Aug 2009, 08:20 AM
  3. 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
  4. Address Format?
    By Chepster in forum General Questions
    Replies: 5
    Last Post: 10 Mar 2007, 10:11 AM

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