Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Zone Rates (The shipping rate cannot be determined at this time) issue

Zone Rates (The shipping rate cannot be determined at this time) issue

Views: 4,015

Results 21 to 39 of 39
9 Jun 2012, 3:55 PM
#21
ajeh avatar

ajeh

Oba-san

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

Zone Rates (The shipping rate cannot be determined at this time) issue

What code changes did you make to:
includes/modules/shipping/zone2.php

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Jun 2012, 3:59 PM
#22
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

I posted the content of my ems.php file on modules

<?php
/**
 * @package shippingMethod
 * @copyright Copyright 2003-2009 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: zones2.php 14498 2009-10-01 20:16:16Z ajeh $
 */
/*

  USAGE
  By default, the module comes with support for 3 zones2.  This can be
  easily changed by editing the line below in the zones2 constructor
  that defines $this->num_zones2.

  Next, you will want to activate the module by going to the Admin screen,
  clicking on Modules, then clicking on Shipping.  A list of all shipping
  modules should appear.  Click on the green dot next to the one labeled
  zones2.php.  A list of settings will appear to the right.  Click on the
  Edit button.

  PLEASE NOTE THAT YOU WILL LOSE YOUR CURRENT SHIPPING RATES AND OTHER
  SETTINGS IF YOU TURN OFF THIS SHIPPING METHOD.  Make sure you keep a
  backup of your shipping settings somewhere at all times.

  If you want an additional handling charge applied to orders that use this
  method, set the Handling Fee field.

  Next, you will need to define which countries are in each zone.  Determining
  this might take some time and effort.  You should group a set of countries
  that has similar shipping charges for the same weight.  For instance, when
  shipping from the US, the countries of Japan, Australia, New Zealand, and
  Singapore have similar shipping rates.  As an example, one of my customers
  is using this set of zones2:
    1: USA
    2: Canada
    3: Austria, Belgium, Great Britain, France, Germany, Greenland, Iceland,
       Ireland, Italy, Norway, Holland/Netherlands, Denmark, Poland, Spain,
       Sweden, Switzerland, Finland, Portugal, Israel, Greece
    4: Japan, Australia, New Zealand, Singapore
    5: Taiwan, China, Hong Kong

  When you enter these country lists, enter them into the Zone X Countries
  fields, where "X" is the number of the zone.  They should be entered as
  two character ISO country codes in all capital letters.  They should be
  separated by commas with no spaces or other punctuation. For example:
    1: US
    2: CA
    3: AT,BE,GB,FR,DE,GL,IS,IE,IT,NO,NL,DK,PL,ES,SE,CH,FI,PT,IL,GR
    4: JP,AU,NZ,SG
    5: TW,CN,HK

  Now you need to set up the shipping rate tables for each zone.  Again,
  some time and effort will go into setting the appropriate rates.  You
  will define a set of weight ranges and the shipping price for each
  range.  For instance, you might want an order than weighs more than 0
  and less than or equal to 3 to cost 5.50 to ship to a certain zone.
  This would be defined by this:  3:5.5

  You should combine a bunch of these rates together in a comma delimited
  list and enter them into the "Zone X Shipping Table" fields where "X"
  is the zone number.  For example, this might be used for Zone 1:
    1:3.5,2:3.95,3:5.2,4:6.45,5:7.7,6:10.4,7:11.85, 8:13.3,9:14.75,10:16.2,11:17.65,
    12:19.1,13:20.55,14:22,15:23.45

  The above example includes weights over 0 and up to 15.  Note that
  units are not specified in this explanation since they should be
  specific to your locale.

  CAVEATS
  At this time, it does not deal with weights that are above the highest amount
  defined.  This will probably be the next area to be improved with the
  module.  For now, you could have one last very high range with a very
  high shipping rate to discourage orders of that magnitude.  For
  instance:  999:1000

  If you want to be able to ship to any country in the world, you will
  need to enter every country code into the Country fields. For most
  shops, you will not want to enter every country.  This is often
  because of too much fraud from certain places. If a country is not
  listed, then the module will add a $0.00 shipping charge and will
  indicate that shipping is not available to that destination.
  PLEASE NOTE THAT THE ORDER CAN STILL BE COMPLETED AND PROCESSED!

  It appears that the osC shipping system automatically rounds the
  shipping weight up to the nearest whole unit.  This makes it more
  difficult to design precise shipping tables.  If you want to, you
  can hack the shipping.php file to get rid of the rounding.

  Lastly, there is a limit of 255 characters on each of the Zone
  Shipping Tables and Zone Countries.

*/

  class ems {
    var $code, $title, $description, $enabled, $num_zones2;

// class constructor
    function ems() {
      $this->code = 'ems';
      $this->title = MODULE_SHIPPING_EMS_TEXT_TITLE;
      $this->description = MODULE_SHIPPING_EMS_TEXT_DESCRIPTION;
      $this->sort_order = MODULE_SHIPPING_EMS_SORT_ORDER;
      $this->icon = '';
      $this->tax_class = MODULE_SHIPPING_EMS_TAX_CLASS;
      $this->tax_basis = MODULE_SHIPPING_EMS_TAX_BASIS;

      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_EMS_STATUS == 'True') ? true : false);
      }

      // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES2 NEEDED
      $this->num_zones2 = 11;

      if (IS_ADMIN_FLAG === true) {
  		// build in admin only additional zones2 if missing in the configuration table due to customization of default $this->num_zones2 = 3
	  	  global $db;
  	  	for ($i = 1; $i <= $this->num_zones2; $i++) {
  		  	$check = $db->Execute("select * from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_EMS_COUNTRIES_" . $i . "'");
	  		  if ($this->enabled && $check->EOF) {
          $default_countries = '';
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Ems " . $i ." Countries', 'MODULE_SHIPPING_EMS_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of EMS " . $i . ".<br />Set as 00 to indicate all two character ISO country codes that are not specifically defined.', '6', '0', 'zen_cfg_textarea(', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Ems " . $i ." Shipping Table', 'MODULE_SHIPPING_EMS_COST_" . $i ."', '3:8.50,7:10.50,99:20.00', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights/prices. Example: 3:8.50,7:10.50,... Weight/Price less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.<br />You can end the last amount as 10000:7% to charge 7% of the Order Total', '6', '0', 'zen_cfg_textarea(', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ems " . $i ." Handling Fee', 'MODULE_SHIPPING_EMS_HANDLING_" . $i."', '0', 'Handling Fee for this shipping zone', '6', '0', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box Zone " . $i . "  (when by weight)' , 'MODULE_SHIPPING_EMS_HANDLING_METHOD_" . $i."', 'Order', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\'Order\', \'Box\'), ', now())");
  		  	}
    		}
  	  } // build in admin only

      if ($this->enabled) {
        global $db;
  	  	for ($i = 1; $i <= $this->num_zones2; $i++) {
          // check MODULE_SHIPPING_TABLE_HANDLING_METHOD is in
          $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_EMS_HANDLING_METHOD_" . $i . "'");
          if ($check_query->EOF) {
            $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box Zone " . $i . "  (when by weight)' , 'MODULE_SHIPPING_EMS_HANDLING_METHOD_" . $i."', 'Order', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\'Order\', \'Box\'), ', now())");
          }
        }
      }
    }

// 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;

    $order_total_amount = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices() ;

      for ($i=1; $i<=$this->num_zones2; $i++) {
        $countries_table = constant('MODULE_SHIPPING_EMS_COUNTRIES_' . $i);
        $countries_table = strtoupper(str_replace(' ', '', $countries_table));
        $country_zones2 = preg_split("/[,]/", $countries_table);
        if (in_array($dest_country, $country_zones2)) {
          $dest_zone = $i;
          break;
        }
        if (in_array('00', $country_zones2)) {
          $dest_zone = $i;
          break;
        }
      }

      if ($dest_zone == 0) {
        $error = true;
      } else {
        $shipping = -1;
        $ems_cost = constant('MODULE_SHIPPING_EMS_COST_' . $dest_zone);

        $zones2_table = preg_split("/[:,]/" , $ems_cost);
        $size = sizeof($ems_table);
        $done = false;
        for ($i=0; $i<$size; $i+=2) {
          switch (MODULE_SHIPPING_EMS_METHOD) {
        	  case (MODULE_SHIPPING_EMS_METHOD == 'Weight'):
              if (round($shipping_weight,9) <= $ems_table[$i]) {
                $shipping = $zones2_table[$i+1];

                switch (SHIPPING_BOX_WEIGHT_DISPLAY) {
                case (0):
                  $show_box_weight = '';
                  break;
                case (1):
                  $show_box_weight = ' (' . $shipping_num_boxes . ' ' . TEXT_SHIPPING_BOXES . ')';
                  break;
                case (2):
                  $show_box_weight = ' (' . number_format($shipping_weight * $shipping_num_boxes,2) . MODULE_SHIPPING_EMS_TEXT_UNITS . ')';
                  break;
                default:
                  $show_box_weight = ' (' . $shipping_num_boxes . ' x ' . number_format($shipping_weight,2) . MODULE_SHIPPING_EMS_TEXT_UNITS . ')';
                  break;
                }

//                $shipping_method = MODULE_SHIPPING_EMS_TEXT_WAY . ' ' . $dest_country . (SHIPPING_BOX_WEIGHT_DISPLAY >= 2 ? ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_EMS_TEXT_UNITS : '');
                $shipping_method = MODULE_SHIPPING_EMS_TEXT_WAY . ' ' . $dest_country . $show_box_weight;
                $done = true;
        if (strstr($zones2_table[$i+1], '%')) {
          $shipping = ($zones2_table[$i+1]/100) * $order_total_amount;
        } else {
          $shipping = $zones2_table[$i+1];
        }
                break;
        	    }
      	    break;
        	  case (MODULE_SHIPPING_EMS_METHOD == 'Price'):
// shipping adjustment
              if (($_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices()) <= $zones2_table[$i]) {
                $shipping = $ems_table[$i+1];
                $shipping_method = MODULE_SHIPPING_EMS_TEXT_WAY . ' ' . $dest_country;
        if (strstr($ems_table[$i+1], '%')) {
          $shipping = ($ems_table[$i+1]/100) * $order_total_amount;
        } else {
          $shipping = $ems_table[$i+1];
        }
                $done = true;
                break;
	            }
	          break;
        	  case (MODULE_SHIPPING_EMS_METHOD == 'Item'):
// shipping adjustment
              if (($total_count - $_SESSION['cart']->free_shipping_items()) <= $ems_table[$i]) {
                $shipping = $ems_table[$i+1];
                $shipping_method = MODULE_SHIPPING_EMS_TEXT_WAY . ' ' . $dest_country;
                $done = true;
        if (strstr($ems_table[$i+1], '%')) {
          $shipping = ($ems_table[$i+1]/100) * $order_total_amount;
        } else {
          $shipping = $ems_table[$i+1];
        }
                break;
  	          }
	          break;
          }
          if ($done == true) {
            break;
          }
        }

        if ($shipping == -1) {
          $shipping_cost = 0;
          $shipping_method = MODULE_SHIPPING_EMS_UNDEFINED_RATE;
        } else {
          switch (MODULE_SHIPPING_EMS_METHOD) {
        	  case (MODULE_SHIPPING_EMS_METHOD == 'Weight'):
              // charge per box when done by Weight
              // Handling fee per box or order
              if (constant('MODULE_SHIPPING_EMS_HANDLING_METHOD_' . $dest_zone) == 'Box') {
                $shipping_cost = ($shipping * $shipping_num_boxes) + constant('MODULE_SHIPPING_EMS_HANDLING_' . $dest_zone) * $shipping_num_boxes;
              } else {
                $shipping_cost = ($shipping * $shipping_num_boxes) + constant('MODULE_SHIPPING_EMS_HANDLING_' . $dest_zone);
              }
              break;
        	  case (MODULE_SHIPPING_EMS_METHOD == 'Price'):
              // don't charge per box when done by Price
              $shipping_cost = ($shipping) + constant('MODULE_SHIPPING_EMS_HANDLING_' . $dest_zone);
            break;
        	  case (MODULE_SHIPPING_EMS_METHOD == 'Item'):
              // don't charge per box when done by Item
              $shipping_cost = ($shipping) + constant('MODULE_SHIPPING_EMS_HANDLING_' . $dest_zone);
            break;
          }
        }
      }
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_EMS_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => $shipping_method,
                                                     'cost' => $shipping_cost)));

      if ($this->tax_class > 0) {
        $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
      }

      if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);

      if (strstr(MODULE_SHIPPING_EMS_SKIPPED, $dest_country)) {
        // don't show anything for this country
        $this->quotes = array();
      } else {
        if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_EMS_INVALID_ZONE;
      }

      return $this->quotes;
    }

    function check() {
      global $db;
      if (!isset($this->_check)) {
        $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_EMS_STATUS'");
        $this->_check = $check_query->RecordCount();
      }
      return $this->_check;
    }

    function install() {
      global $db;
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable Ems Method', 'MODULE_SHIPPING_EMS_STATUS', 'True', 'Do you want to offer zone rate shipping?', '6', '0', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Calculation Method', 'MODULE_SHIPPING_EMS_METHOD', 'Weight', 'Calculate cost based on Weight, Price or Item?', '6', '0', 'zen_cfg_select_option(array(\'Weight\', \'Price\', \'Item\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_EMS_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Tax Basis', 'MODULE_SHIPPING_EMS_TAX_BASIS', 'Shipping', 'On what basis is Shipping Tax calculated. Options are<br />Shipping - Based on customers Shipping Address<br />Billing Based on customers Billing address<br />Store - Based on Store address if Billing/Shipping Zone equals Store zone', '6', '0', 'zen_cfg_select_option(array(\'Shipping\', \'Billing\', \'Store\'), ', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_EMS_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
      $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Skip Countries, use a comma separated list of the two character ISO country codes', 'MODULE_SHIPPING_EMS_SKIPPED', '', 'Disable for the following Countries:', '6', '0', 'zen_cfg_textarea(', now())");

      for ($i = 1; $i <= $this->num_zones2; $i++) {
        $default_countries = '';
        if ($i == 1) {
          $default_countries = 'US,CA';
        }
        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Zone " . $i ." Countries', 'MODULE_SHIPPING_EMS_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of Zone " . $i . ".<br />Set as 00 to indicate all two character ISO country codes that are not specifically defined.', '6', '0', 'zen_cfg_textarea(', now())");
        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Zone " . $i ." Shipping Table', 'MODULE_SHIPPING_EMS_COST_" . $i ."', '3:8.50,7:10.50,99:20.00', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights/prices. Example: 3:8.50,7:10.50,... Weight/Price less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.<br />You can also use percentage amounts, such 25:8.50,35:5%,40:9.50,10000:7% to charge a percentage value of the Order Total', '6', '0', 'zen_cfg_textarea(', now())");
        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Handling Fee', 'MODULE_SHIPPING_EMS_HANDLING_" . $i."', '0', 'Handling Fee for this shipping zone', '6', '0', now())");

        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box Zone " . $i . " (when by weight)' , 'MODULE_SHIPPING_EMS_HANDLING_METHOD_" . $i."', 'Order', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\'Order\', \'Box\'), ', now())");

      }
    }

    function remove() {
      global $db;
      $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE\_SHIPPING\_EMS\_%'");
    }

    function keys() {
      $keys = array('MODULE_SHIPPING_EMS_STATUS', 'MODULE_SHIPPING_EMS_METHOD', 'MODULE_SHIPPING_EMS_TAX_CLASS', 'MODULE_SHIPPING_EMS_TAX_BASIS', 'MODULE_SHIPPING_EMS_SORT_ORDER', 'MODULE_SHIPPING_EMS_SKIPPED');

      for ($i=1; $i<=$this->num_zones2; $i++) {
        $keys[] = 'MODULE_SHIPPING_EMS_COUNTRIES_' . $i;
        $keys[] = 'MODULE_SHIPPING_EMS_COST_' . $i;
        $keys[] = 'MODULE_SHIPPING_EMS_HANDLING_' . $i;
        $keys[] = 'MODULE_SHIPPING_EMS_HANDLING_METHOD_' . $i;
      }

      return $keys;
    }
  }
?>
9 Jun 2012, 4:29 PM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

I made those 2 clones of Zone Rate zones for zones2.php and zones3.php so you would not have to customize the Zone Rate zones and clone your own modules and just change the language file ...

You have several references to:
zones2

that are conflicting as half of your code uses ems and half uses zones2 in the variables ... example:

        $zones2_table = preg_split("/[:,]/" , $ems_cost);
        $size = sizeof($ems_table);

then reference the table mixing up:
$ems_table
$zones2_table

and I did not go through all of the code but there are others ...

If you use the zones2.php and just change the 1 line:

      $this->num_zones2 = 3;

to be:

      $this->num_zones2 = [B]11[/B];

and then install the Zone 2 Rates zones2 and configure it with your settings that you have in ems ... then uninstall the ems ... does the Zone 2 Rates zones2 work correctly?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Jun 2012, 11:23 PM
#24
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

I tried only with the 1st zone rates for testing the zone2 rates numbers i left unmodified but i got always the same error. Maybe i wrote the shipping rates wrong?

9 Jun 2012, 11:25 PM
#25
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Go to Modules ... Shipping ... and click on the Shipping Module and paste what you see in the right panel here ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Jun 2012, 11:29 PM
#26
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Do you mean the shipping rates values i used for EMS? Sorry, i got a little confused...

9 Jun 2012, 11:33 PM
#27
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

I'd like to see ALL settings on the shipping module that is broken ...

If you click on it in the Modules ... Shipping ... it will show everything in the right panel ...

NOTE: if you are still using the ems.php file with the code you posted it is broken as you did not write the code correctly ... this is why I suggested use the Zone 2 Rates zones2 shipping module and configure it with the settings from the ems shipping module, then do a REMOVE on the ems shipping module and see if the pricing is working on the Zone 2 Rates zones2 shipping module ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

9 Jun 2012, 11:43 PM
#28
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

I see the other shipping modules and the airmail one is working so seems only ems was broken now i deleted the ems.php files on languages and modules folder but still the error appears. By the way, all the other shipping modules are disabled (with the option false) not uninstalled, it could be a problem leave them in this way? I left also available other than airmail the zone 2 module with the EMS values.

9 Jun 2012, 11:47 PM
#29
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Do you have the URLs to the Products you are testing in the Cart and the Ship To and Ship From addresses?

If you go to the Modules ... Shipping ... what Shipping Modules do not have red dots next to them?

NOTE: do not just say a "name" of a file, what do you see in your Admin and what is the "name" and the filename in the middle of the screen?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Jun 2012, 12:07 AM
#30
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

This is my site where i sell the items:
http://ichigousagishop.com/
A screenshot of my shipping module page
Attachment 10599
Here the zone2 shipping module with the 1st zone EMS rates

10 Jun 2012, 12:14 AM
#31
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Do me a favor and please click on the Shipping Module that is not working and paste the right column here so I can actually test your settings ...

Then, give me an URL to the Products that you are testing and the Ship To address and Ship From address ...

Also what are your settings in the Configuration ... Shipping/Packaging ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Jun 2012, 12:27 AM
#32
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Here some items i'm testing for shipping
http://ichigousagishop.com/index.php?main_page=product_info&cPath=2_19&products_id=5
http://ichigousagishop.com/index.php?main_page=product_info&cPath=9_10&products_id=2
My shipping/packaging settings
Attachment 10600
I do dropshipping so my address is the one from my dropshipper and about the shipping to address? What i have to choose? Any address i find?

Here the shipping module that doesn't work

Zone 2 Based Rates

Enable Zones Method
True

Calculation Method
Weight

Tax Class
--none--

Tax Basis
Shipping

Sort Order
0

Skip Countries, use a comma separated list of the two character ISO country codes


Zone 1 Countries
HK,MO

Zone 1 Shipping Table
0.6:13.38,1.20:16.28,1.8:19.18,2.40:22.08

Zone 1 Handling Fee
0

Handling Per Order or Per Box Zone 1 (when by weight)
Order

Zone 2 Countries


Zone 2 Shipping Table
3:8.50,7:10.50,99:20.00

Zone 2 Handling Fee
0

Handling Per Order or Per Box Zone 2 (when by weight)
Order

Zone 3 Countries


Zone 3 Shipping Table
3:8.50,7:10.50,99:20.00

Zone 3 Handling Fee
0

Handling Per Order or Per Box Zone 3 (when by weight)
Order
10 Jun 2012, 1:15 AM
#33
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

I get with those two Products in the cart:

Shipping quotes are based on the address information you selected:
00000 Hong Kong
Available Shipping Methods Rates
airmail Rates (No shipping available to the selected country)
Zone 2 Rates (Shipping to HK (1 x 0.90lb(s))) $16.28

That looks like Zone 2 Rates is working ...

If you do not want Airmail to show for Hong Kong, you need to set it as one of the skipped countries ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Jun 2012, 1:24 AM
#34
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Ah ok about the airmail shipping for Hong Kong :). But about the "zone 2" name? I have to change all the zone2 to ems on the includes/modules php file? Because i don't want my customer confused about the shipping they have to choose.

10 Jun 2012, 2:00 AM
#35
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Just change the language file:
/includes/languages/english/modules/shipping/zone2.php

and copy to:
/includes/languages/english/modules/shipping/your_template_zone/zone2.php

define('MODULE_SHIPPING_ZONES2_TEXT_TITLE', 'Zone 2 Rates');

And change it to read what you want it to ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Jun 2012, 2:22 AM
#36
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

It works! Thank you so much for the help :D!! Ah, i noticed on the shipping estimator there is the lb(s) instead of kg(s). How i can change this? My item description shows Kg instead...

10 Jun 2012, 3:20 AM
#37
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Go to the Tools ... Developers Tool Kits ... and do a search in the bottom input box for:
lb

and select Catalog and click SEARCH ...

Change the define statements using your templates and override files ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

10 Jun 2012, 1:20 PM
#38
ichigo12 avatar

ichigo12

New Zenner

Join Date:
Jun 2012
Posts:
28
Plugin Contributions:
0

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

Finally i have fixed them! Thank you so much for the help again :D!

10 Jun 2012, 1:40 PM
#39
ajeh avatar

ajeh

Oba-san

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

Re: Zone Rates (The shipping rate cannot be determined at this time) issue

You are most welcome ... thanks for the update that everything is working now ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!