Forums / Built-in Shipping and Payment Modules / Want to use ISO (3) codes, USA, CAN, GBR, etc

Want to use ISO (3) codes, USA, CAN, GBR, etc

Locked

Views: 3,266

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
9 Oct 2007, 7:28 PM
#1
kevinw avatar

kevinw

New Zenner

Join Date:
Mar 2007
Posts:
47
Plugin Contributions:
0

Want to use ISO (3) codes, USA, CAN, GBR, etc

Hi all,
I would like to use the ISO (3) code over the ISO (2) code,
it makes it clearer that CAN is Canada, and not CA is California..

I have looked over the whole site, documentation, and admin screens
and just can't see if it already exists - and then why capture the ISO (3)
if it not being used... So I kept looking... alas..

Is there a switch to use ISO (3) that I can't find..
Or do I need to go into the code and just change the display to (3)..

Along these lines I see in the Admin>Locations>Countries a field
to be set, Address Format: 1. What is this? can this help? just can't find
the documentation that I am sure is right there in front of me..

Thanks...
KevinW

9 Oct 2007, 10:08 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Want to use ISO (3) codes, USA, CAN, GBR, etc

"Where" are you wanting to use the ISO(3) code?

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

9 Oct 2007, 10:21 PM
#3
kevinw avatar

kevinw

New Zenner

Join Date:
Mar 2007
Posts:
47
Plugin Contributions:
0

Re: Want to use ISO (3) codes, USA, CAN, GBR, etc

In Step 1 of 3 - Delivery Information...
Shipping to CA.....

main_page=checkout_shipping

When she is in Canada...
So by using the ISO3 code it would be CAN.

It was confusing for a customer -
enough so that she emailed the shop owner to ask
for clarification...

Otherwise I will determine the template and put in some
code for those countries/areas that might be confusing -
to have a longer name (Canada in this case)...

I am leaving town for a bit and if it were a configuration
setting I would do that before I leave - otherwise it will
wait for me to make some coding...

Thanks for checking in..

9 Oct 2007, 10:33 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Want to use ISO (3) codes, USA, CAN, GBR, etc

It seems you must be using the Zones shipping module.

Edit the zones shipping module.
Around line 120, you see this:

      $dest_country = $order->delivery['country']['iso_code_2'];
```Add another line below it, like this:```
      $dest_country = $order->delivery['country']['iso_code_2'];
      $dest_country3 = $order->delivery['country']['iso_code_3'];
```There are 3 ways to configure the module, and thus 3 different places where you could display the 3-char code instead.
Look for these 3 lines, and change $dest_country to $dest_country3 instead:
Line 171:  ```
                $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country . $show_box_weight;
```Line 185:```
                $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country;
```Line 199:```
                $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_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.

9 Oct 2007, 10:49 PM
#5
kevinw avatar

kevinw

New Zenner

Join Date:
Mar 2007
Posts:
47
Plugin Contributions:
0

Re: Want to use ISO (3) codes, USA, CAN, GBR, etc

PERFECT - Thanks... (yes, using the zones module)
It would have taken me some time to find the code...

tested, put into production, and works just fine...

17 Mar 2008, 12:20 AM
#6
cntgifts avatar

cntgifts

Totally Zenned

Join Date:
Sep 2005
Posts:
836
Plugin Contributions:
0

Re: Want to use ISO (3) codes, USA, CAN, GBR, etc

IS there a way to change it so it shows the country name instead of the country code