Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I have searched and searched for the answer to this one but havent been able to find the answer anywhere.

 

Its a very simple question, how do I change the iso-code-2 display on the zones shipping to the country name, during checkout. Instead of it saying

 

Shipping to ES

 

I want it to say

 

Shipping to Spain

 

 

Ive looked at the zones.php and can find where it says the following

 

// class methods

function quote($method = '') {

global $order, $shipping_weight, $shipping_num_boxes, $total_count;

$dest_country = $order->delivery['country']['iso_code_2'];

$dest_zone = 0;

$error = false;

 

I assumed that if I changed the iso_code_2 to say name that would do the job but it doesnt.

 

Any clues??

 

Thanks

Victor Pereyra

Posted (edited)

Have you already tried countries_name?

But I see that instead of the countries_iso_code_2, its just iso_code_2 in the code, so perhaps that doesn't work (or you've already tried it :P )

Edited by jbridgman
Posted

I've seen that the solution is not there, because the variable $dest_country need the iso_code_2 for another process, so maybe we must create a new variable something like :

 

$dest_country2 = $order->delivery['country']['name'];

 

but it doesnt work either

Victor Pereyra

  • 9 months later...
Posted

You almost guessed it right. You have to change this line:

$dest_country = $order->delivery['country']['iso_code_2'];

 

to this

 

$dest_country = $order->delivery['country']['title'];

 

That is, replace iso_code_2 with title.

 

Also, in the shipping: zone rates module, you now have to use the FULL name of the country, e.g. Sweden instead of the ISO-2-code (SE), or else it will simply say "No shipping available to the selected country".

 

Also, you might (and it's probably safer that way) need to remove the zone-rates-module before you modify zones.php

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...