Totally Zenned
- Join Date:
- Jul 2012
- Posts:
- 16,908
- Plugin Contributions:
- 2
Future Japanese Language Pack Status, version 1.5.5 and beyond...
gernot:
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.