Jump to content
Latest News: (loading..)
Sign in to follow this  
bammedia

zone rates

Recommended Posts

Hi, I was wondering if anybody knows how to use zone rates with prices instead of weight.

 

Thanks.

In admin, there should be the option to use or the other.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Wow Coopco, that was so NOT a helpful answer. I think this person may have realized that option existed. Personally I'm looking for the same answer so I'm no help either.

 

I have a customer that wants US shipping set to $8.00 to $10.00 and International shipping set to $25.00. Also once I have it setup, how do I test the International rate since I'm clearly in a US zone? Thanks for any useful help. :thumbsup:

Edited by digitalalias

Marc F.

"Let the blind lead the blind... it's more fun to watch."

Share this post


Link to post
Share on other sites
Wow Coopco, that was so NOT a helpful answer. I think this person may have realized that option existed. Personally I'm looking for the same answer so I'm no help either.

 

I have a customer that wants US shipping set to $8.00 to $10.00 and International shipping set to $25.00. Also once I have it setup, how do I test the International rate since I'm clearly in a US zone? Thanks for any useful help. :thumbsup:

Probably not if they new the option existed (but then why ask). If the default ones don't do it, you look in the contrib area for one that does.

 

Probably table rates with two shipping zones (and set zone rates with prices instead of weight).

 

You set up an international shipping address in your test account and ship to it.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
Probably not if they new the option existed (but then why ask). If the default ones don't do it, you look in the contrib area for one that does.

 

Probably table rates with two shipping zones (and set zone rates with prices instead of weight).

 

You set up an international shipping address in your test account and ship to it.

 

 

i donot see an option for anything in zone rates. There is the option when using the table rates and I have that set up.

 

Shipping rates to Zone 1 destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone 1 destinations.

 

this is what i have to workwith in the admin area, i have tried to set prices... 29.95:8.95,49.95:7.50,99.95:4.50,149.95:2.50 for example but this does not work and it seems to just default to wieghts

Share this post


Link to post
Share on other sites
i donot see an option for anything in zone rates. There is the option when using the table rates and I have that set up.

 

Shipping rates to Zone 1 destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone 1 destinations.

 

this is what i have to workwith in the admin area, i have tried to set prices... 29.95:8.95,49.95:7.50,99.95:4.50,149.95:2.50 for example but this does not work and it seems to just default to wieghts

I should have said Probably table rates with two shipping zones (and set zone rates with prices instead of weight) or vice versa.

 

There is a contrib that lets you have table 2 table 3 etc and you can set that up.

http://www.oscommerce.com/community/contri...xtra+table+rate


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
I should have said Probably table rates with two shipping zones (and set zone rates with prices instead of weight) or vice versa.

 

There is a contrib that lets you have table 2 table 3 etc and you can set that up.

http://www.oscommerce.com/community/contri...xtra+table+rate

 

 

That worked great...Thanks alot for the help!!!!!!!!!!!!!!

Share this post


Link to post
Share on other sites

I have this same issue. I need to ship by price to two zones: 1.international and 2.U.S. So I added the extra table rate successfully BUT how do you set up the two different zones. I have no idea how to do this. Any help would be GREATLY appreciated. :rolleyes:

Share this post


Link to post
Share on other sites
hai,

my question is,

tax rate for australi 10.10% and newzealand 13.00%

how to done this

please help me...

 

thanks

Set up a tax rate rate for australia and apply that to australian zones, do the same for new zealand.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
Set up a tax rate rate for australia and apply that to australian zones, do the same for new zealand.

 

hai,

i done what to say but it taking only for australia not for newzealand.

 

i created two zones one for aus and one for newzealand.

and then i create a common zone class

and then i insert two tax rate for aus and new with 10.10% and 13.00%

 

but still i am not gettting the correct answere

 

could be plz help me...

Share this post


Link to post
Share on other sites

hai,

i dont know how to do this can any one help me....

the below is my constraints

 

Shipping is £1.65 or free for UK orders over £40.00.

For continental Europe shipping is £2.15.

For the rest of the world: £3.16

 

how to do this

Share this post


Link to post
Share on other sites
hai,

i done what to say but it taking only for australia not for newzealand.

 

i created two zones one for aus and one for newzealand.

and then i create a common zone class

and then i insert two tax rate for aus and new with 10.10% and 13.00%

 

but still i am not gettting the correct answere

 

could be plz help me...

No, no common zone.

 

There is a contrib that lets you use multiple zones with shipping for each zone. I can't remember the exact name,

here is the includes\module\shipping\zones.php

<?php
/*

$Id: zones.php,v 1.20 2003/06/15 19:48:09 thomasamoulton Exp $

 Some changes to zonesworld for MS2
 by Paul Mathot 2004/05/12
 added: $shipping_num_boxes and shippingtax
 it's a direct replacement for zones.php now
 credits to the osCommerce team and elari

osCommerce, Open Source E-Commerce Solutions
[url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

Copyright © 2002-2003 elari for osCommerce

Released under the GNU General Public License

Modified by Coopco Pty Ltd 2005
Australia Post Air Parcel or Economy Parcel Shipping (no insurance)

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

elari
i have made some change to this module, that come now with 3 default zone
1 : NL can be changed for your country
2 : AT,BE,GB,DE,FR,GL,IS,IE,IT,NO,DK,PL,ES,SE,CH,FI,PT,IL,GR   that are other European country except NL defined in zone 1
3 : All Other World Country not defined.
    If you define more zone, keep in mind that this is the lastest zone that will be used for country not listed


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
zones.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 zones:
  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!
elari : this has been changed, now the country not listed use the rate defined for
lastest zone

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 zones {
  var $code, $title, $description, $enabled, $num_zones;

// class constructor
  function zones() {
    $this->code = 'zones';
    $this->title = MODULE_SHIPPING_ZONES_TEXT_TITLE;
    $this->description = MODULE_SHIPPING_ZONES_TEXT_DESCRIPTION;
    $this->sort_order = MODULE_SHIPPING_ZONES_SORT_ORDER;
    $this->icon = '';
    $this->tax_class = MODULE_SHIPPING_ZONES_TAX_CLASS;
    $this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);

    // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
    $this->num_zones = 5;
  }

// class methods
  function quote($method = '') {
    global $order, $shipping_weight, $shipping_num_boxes, $total_weight;

    $dest_country = $order->delivery['country']['iso_code_2'];
    $dest_zone = 0;
    $error = false;

    for ($i=1; $i<=$this->num_zones; $i++) {
      $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
      $country_zones = split("[,]", $countries_table);
      if (in_array($dest_country, $country_zones)) {
        $dest_zone = $i;
        break;
      }
    }

    // elari - Added to select default country if not in listing      
    if ($dest_zone == 0) {
      $dest_zone = $this->num_zones;    // the zone is the lastest zone avalaible
    }
    // elari - Added to select default country if not in listing
    if ($dest_zone == 0) {
      $error = true;      // this can no more achieve since by default the value is set to the max number of zones
    } else {
      $shipping = -1;
      $zones_cost = constant('MODULE_SHIPPING_ZONES_COST_' . $dest_zone);

      $zones_table = split("[:,]" , $zones_cost);
      $size = sizeof($zones_table);
      for ($i=0; $i<$size; $i+=2) {
        if ($shipping_weight <= $zones_table[$i]) {
          $shipping = $zones_table[$i+1];
          $shipping_method = MODULE_SHIPPING_ZONES_TEXT_WAY . ' ' . $order->delivery['country']['title'] . ': ';
          if ($shipping_num_boxes > 1) {
            $shipping_method .= $shipping_num_boxes . 'x ';
          }
          $shipping_method .= $shipping_weight . ' ' . MODULE_SHIPPING_ZONES_TEXT_UNITS;
          break;
        }
      }

      if ($shipping == -1) {
        $shipping_cost = 0;
        $shipping_method = MODULE_SHIPPING_ZONES_UNDEFINED_RATE;
      } else {
        $shipping_cost = ($shipping * $shipping_num_boxes) + constant('MODULE_SHIPPING_ZONES_HANDLING_' . $dest_zone);
      }
    }

    $this->quotes = array('id' => $this->code,
                          'module' => MODULE_SHIPPING_ZONES_TEXT_TITLE,
                          'methods' => array(array('id' => $this->code,
                                                   'title' => $shipping_method,
                                                   'cost' => $shipping_cost)));

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

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

    if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_ZONES_INVALID_ZONE;

    return $this->quotes;
  }

  function check() {
    if (!isset($this->_check)) {
      $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_ZONES_STATUS'");
      $this->_check = tep_db_num_rows($check_query);
    }
    return $this->_check;
  }

  // elari - Added to select default country if not in listing
  function install() {
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable Zones Method', 'MODULE_SHIPPING_ZONES_STATUS', 'True', 'Do you want to offer zone rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
    tep_db_query("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_ZONES_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_ZONES_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
    for ($i = 1; $i <= $this->num_zones; $i++) {
       $default_countries = '';
//Australian Zones - based on shipping to NF
      if ($i == 1) {        
     $default_countries = 'AU,CX,CC,NF';
        $shipping_table = '0.250:3.85,0.500:5.00,1:10.95,2:12.45,3:14.95,4:17.45,5:19.95,6:22.45,7:24.9
5,8:27.45,9:29.95,10:32.45';
      }
//Zone A - Airmail New Zealand
      if ($i == 2) {
        $default_countries = 'NZ';
        $shipping_table = '0.250:6.40,0.50:9.75,0.750:13.10,1:16.45,1.250:19.80,1.50:23.15,1.750:26.50,
2:30.00,2.50:33.50,3:37.00,3.50:40.50,4:44.00,4.50:47.50,5:51.00,5.50:54.50,6:58.
00,6.50:61.50,7:65.00,7.5:68.50,8:72.00,8.5:75.50,9:79.00,9.5:82.5,10:86.00';
      }
//Zone B - Airmail Asia/Pacific
      if ($i == 3) {
        $default_countries = 'BD,BT,BN,KH,CN,CK,TL,FJ,GU,HK,IN,ID,JP,KI,KR,LA,MO,MY,MV,MH,FM,MM,NR,NP,NC,N
U,PF,PK,PW,PG,PH,WS,SG,SB;LK,TW,TH,TK,TO,TV,VU,VN,WF';
        $shipping_table = '0.250:7.50,0.50:11.85,0.750:16.20,1:20.55,1.250:24.90,1.50:29.25,1.750:33.60
,2:38.00,2.50:42.55,3:47.10,3.50:51.65,4:56.20,4.50:60.75,5:65.30,5.50:69.85,6:74
.40,6.50:78.95,7:83.50,7.5:88.05,8:92.60,8.5:97.15,9:101.70,9.5:106.25,10:110.80';
      }
//Zone C - Airmail US/Canada/Middle East
      if ($i == 4) {
        $default_countries = 'CA,IL,MX,US,AF,BH,KM,CY,IR,IQ,JO,KW,LB,MG,MU,OM,QA,RE,SA,SY,AE,YE';
        $shipping_table = '0.250:8.50,0.50:13.90,0.750:19.30,1:24.70,1.250:30.10,1.50:35.50,1.750:40.90
,2:46.50,2.50:53.10,3:59.70,3.50:66.30,4:72.90,4.79.50.50,5:86.10,5.50:92.70,6:99
.30,6.50:105.90,7:112.50,7.5:119.10,8:125.70,8.5:132.30,9:138.90,9.5:145.50,10:15
2.10';
      }
//Zone D - Airmail Rest of the World
      if ($i == 5) {
        $default_countries = 'All Others'; // this must be the lastest zone
        $shipping_table = '0.250:10.00,0.50:16.95,0.750:23.90,1:30.85,1.250:37.80,1.50:44.75,1.750:51.7
0,2:58.50,2.50:67.20,3:75.90,3.50:84.60,4:93.30,4.50:102.00,5:110.70,5.50:119.4,6
:128.10,6.50:136.80,7:145.50,7.5:154.20,8:162.90,8.5:171.60,9:180.30,9.50:189.00,
10:197.70';
      }
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Countries', 'MODULE_SHIPPING_ZONES_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of Zone " . $i . ".', '6', '0', now())");
      tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Shipping Table', 'MODULE_SHIPPING_ZONES_COST_" . $i ."', '" . $shipping_table . "', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.', '6', '0', now())");
      tep_db_query("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_ZONES_HANDLING_" . $i ."', '0', 'Handling Fee for this shipping zone', '6', '0', now())");

  }
}

  function remove() {
    tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
  }

  function keys() {
    $keys = array('MODULE_SHIPPING_ZONES_STATUS', 'MODULE_SHIPPING_ZONES_TAX_CLASS', 'MODULE_SHIPPING_ZONES_SORT_ORDER');

    for ($i=1; $i<=$this->num_zones; $i++) {
      $keys[] = 'MODULE_SHIPPING_ZONES_COUNTRIES_' . $i;
      $keys[] = 'MODULE_SHIPPING_ZONES_COST_' . $i;
      $keys[] = 'MODULE_SHIPPING_ZONES_HANDLING_' . $i;
    }

    return $keys;
  }
}
?>

 

Here is the includes\languages\english\modules\shipping\zones.php

 

<?php
/*
 $Id: zones.php,v 1.3 2002/11/19 01:48:08 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2002 osCommerce

 Released under the GNU General Public License

 Modified by Coopco Pty Ltd 2005
 Australia Post Air Parcel or Economy Parcel Shipping (no insurance)
*/

define('MODULE_SHIPPING_ZONES_TEXT_TITLE', 'Zone Rates');
define('MODULE_SHIPPING_ZONES_TEXT_DESCRIPTION', 'Zone Based Rates');
define('MODULE_SHIPPING_ZONES_TEXT_WAY', 'Australia Post Air Parcel (no insurance) to ');
define('MODULE_SHIPPING_ZONES_TEXT_UNITS', 'kg(s)');
define('MODULE_SHIPPING_ZONES_INVALID_ZONE', 'No shipping information is available to the selected country');
define('MODULE_SHIPPING_ZONES_UNDEFINED_RATE', 'The shipping rate cannot be determined at this time');
?>

 

You will have to modify it for what you want.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
I should have said Probably table rates with two shipping zones (and set zone rates with prices instead of weight) or vice versa.

 

There is a contrib that lets you have table 2 table 3 etc and you can set that up.

http://www.oscommerce.com/community/contri...xtra+table+rate

 

 

Holy Cow, I have been looking for this for weeks now!!!! Why don't they just add this contrib to the main download?????

Share this post


Link to post
Share on other sites
I should have said Probably table rates with two shipping zones (and set zone rates with prices instead of weight) or vice versa.

 

There is a contrib that lets you have table 2 table 3 etc and you can set that up.

http://www.oscommerce.com/community/contri...xtra+table+rate

 

 

Hi, this looks like it's exactly what I need - but I'm confused about how I set the zones. In the extra table rate editing, it gives me a drop down menu of zones to use it for, and the menu only has one option, UK. How do I add more zones to it?

 

Edit - sorry, I asked too soon - I was able to add more by adding tax zones. I didn't think of that at first because I didn't think taxes had anything to do with it, sorry!

Edited by spacedoutboy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×