Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Change ISO Code to Country Name on Zone Rate Shipping

Change ISO Code to Country Name on Zone Rate Shipping

Views: 949

Results 1 to 2 of 2
5 Nov 2014, 8:32 PM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Change ISO Code to Country Name on Zone Rate Shipping

Does anybody know how I would go about changing the ISO CODE to the actual Country Name when using Zone based shipping.

E.g. Change

Shipping to EN

to

Shipping to ENGLAND

5 Nov 2014, 11:53 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Change ISO Code to Country Name on Zone Rate Shipping

Edit the shipping module zones.php and add the code in RED:

  function quote($method = '') {
    global $order, $shipping_weight, $shipping_num_boxes, $total_count;
    $dest_country = $order->delivery['country']['iso_code_2'];
[B]    $dest_country_name = $order->delivery['country']['title'];
[/B]    $dest_zone = 0;

around 309:

              $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country[B]_name[/B] . $show_box_weight;

around 340:

              $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country_[B]name[/B];

around 374:

              $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $dest_country[B]_name[/B];