Page 9 of 9 FirstFirst ... 789
Results 81 to 83 of 83
  1. #81
    Join Date
    Jul 2012
    Posts
    11,627
    Plugin Contributions
    13

    Default Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

    Quote Originally Posted by gernot View Post
    Problem solved! It appears that the class order.php is indeed the origin of the order->delivery information, via shipping_address, which is updated on each submit via the variable sendto (which is the selected address_id from the pull-down menu).
    Modifying the MySQL query for shipping_address to use the new address_format_id from address_book (instead of from the countries table) and language_id, enabled me to obtain the correct format and language for country and zone in the full address in the shipping estimator pop-up.

    Note: I added the Japanese postcode sign "〒" in front of postcode in the address format, but needed a space separation on either side, else whatever it was touching would be ignored. This worked fine. However, I was unable to do the same with "様" ( read as "sama") after the name, since this would then be parsed as part of the succeeding address component. I am not sure if one can add such a component in the address_format directly, but if so, it would be great to know.
    The only alternative I see at present is to output it on demand each time in the code, depending on language_id I suppose.
    Instead of editing the includes/classes/order.php file, it contains several notify events that can be observed (back to that again) such that the data can be reviewed and if it is determined necessary to use the alternate method of query then replace that data.

    For example there are notifiers in the cart function to be able to detect specific information about the product, the attributes, prepare to apply taxes and at the very end that the processing is complete. With ZC 1.5.3 and above, there are several options made available when a notifier has additional parameters attached to it. You would be able at any of those notifiers to modify the classes delivery data to suit whatever is needed. Again, this way the class file remains untouched and the data is processed/groomed to support the need.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  2. #82
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    53
    Plugin Contributions
    0

    Default Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

    Hello,
    Thank you for that reminder, yes, I had forgotten about the notifiers in the order.php class file!
    I can try to move those changes to the notifiers later on, when I have everything working as I want (now I am working on the billing address, not sure what other parts I will need to adapt). BTW, the multilanguage country module also edited the order.php directly (well, the documentation asked me to edit it appropriately), so I should later check whether those changes too could have been done with notifiers instead.

  3. #83
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    53
    Plugin Contributions
    0

    Default Re: Future Japanese Language Pack Status, version 1.5.5 and beyond...

    Progress report: I have managed to integrate language choice into the create_account module and tpl_modules_create_account, currently on the login page (which pulls in the JavaScript for pages/login). It took quite a while to get the JavaScript to run properly, switching between English and Japanese language choices for the new address (while the site itself might be viewed at the time independently either in Japanese or English).
    I found that there are a few bugs in the JavaScript that make themselves apparent occasionally. In particular, the hideStateField and showStateField functions work on a couple of IDs, not all of which are present in the page in question. For example, 'stText' is in the shipping estimator template but not in the login page / create_account template. This seems to break the execution of JavaScript code manipulating the select items.
    I have commented out the show/hide commands relating to 'stText' for now, but if the same JavaScript is to be used for convenience in every page, then probably a test for the existence of the ID is needed to make the commands conditional.

    Anyhow, the result of the above is that for a new address, the address language can be chosen as either English or Japanese, and the country and zone pulldowns change language correspondingly (they do not necessarily need this as the country and zone code is used in the address saving, but it makes for a better user experience). Additionally, if a zone has already been selected, and only the address language is changed, the zone remains selected.
    The screenshots attached show the site being viewed in Japanese, and the address language being selected independently.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screenshot from 2017-11-25 00-50-09.png 
Views:	6 
Size:	11.9 KB 
ID:	17482   Click image for larger version. 

Name:	Screenshot from 2017-11-25 00-50-38.png 
Views:	7 
Size:	11.3 KB 
ID:	17483  

 

 
Page 9 of 9 FirstFirst ... 789

Similar Threads

  1. Japanese Language Pack problem
    By i.chan in forum Addon Language Packs
    Replies: 1
    Last Post: 14 Jun 2009, 11:21 PM
  2. Japanese Language Pack
    By namasa in forum Addon Language Packs
    Replies: 74
    Last Post: 22 Dec 2008, 03:29 PM
  3. japanese language pack...
    By fish_who in forum Addon Language Packs
    Replies: 1
    Last Post: 10 Aug 2006, 04:20 AM

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