Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Hide shipping method when order exceeds certain weight

Hide shipping method when order exceeds certain weight

Views: 5,320

Results 1 to 20 of 31
30 Aug 2011, 5:39 AM
#1
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Hide shipping method when order exceeds certain weight

Hi

I have looked around the forums for something like this, and actually found a few threads, but discovered nothing that works.

What I have is both regular shipping and an express shipping option -- the max package weight is at 22kg, but the express can only fit up to 5kg, so what is happening now is when a customer's shopping cart weight exceeds 5kg, the express option sits at $0.

What I want to do is disable the express shipping module when the weight of the order exceeds 5kg. That way, only the regular shipping shows if the order doesn't fit the express.

Hoping someone can help me out on this.

Thanks,
Tija

16 Sep 2011, 3:45 AM
#2
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

So... been a while since I posted -- does anyone have any suggestions as to how I can do this?

  • Tija
16 Sep 2011, 3:48 AM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Hide shipping method when order exceeds certain weight

What shipping module(s) are you using for this?

16 Sep 2011, 4:41 AM
#4
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

It's a table rate module.

16 Sep 2011, 4:48 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Hide shipping method when order exceeds certain weight

If you only have Table Rate table ... how are you offering 2 shipping methods? :unsure:

16 Sep 2011, 4:52 AM
#6
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

Sorry -- that wasn't very clear of me (using 'it' instead of 'they').

I use a few cloned table rates... so all the shipping mods I'm using in this case are table rates.

16 Sep 2011, 5:04 AM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Hide shipping method when order exceeds certain weight

You could use the code in RED:

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

    if (!IS_ADMIN_FLAG) {
      global $cart;
      if ($_SESSION['cart']->weight > 22 ) {
        $this->enabled = false;
      }
    }

    if ($this->enabled) {
16 Sep 2011, 5:21 AM
#8
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

Unfortunately, that code isn't working for me.

The shipping still shows as a $0 option :(

16 Sep 2011, 5:23 AM
#9
ajeh avatar

ajeh

Oba-san

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

Re: Hide shipping method when order exceeds certain weight

Make sure that you are putting that code in the copy of the Table Rate table shipping module that you do not want to show when the weight is over 22 ...

What are your settings in the Configuration ... Shipping/Packaging ...

16 Sep 2011, 5:38 AM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Hide shipping method when order exceeds certain weight

MortalWombat:

What I have is both regular shipping and an express shipping option -- the max package weight is at 22kg, but the express can only fit up to 5kg,

I hope you don't mind me asking, but exactly where/how/why did you determine or derive these weight limits?

The reason I ask is because I don't know of any Australian Carrier/Courier that places a 5kg limit on express parcels, and the 22kg limit is actually 2kg higher than Australia Post will allow.

Feel free to tell me to mind my own business if you like (I won't be offended), but it does sadden me a little to see Australian Merchants struggling with shipping quotes, when there is generally no need.

Cheers
Rod

16 Sep 2011, 5:50 AM
#11
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

Hi Rod and that's fine to point out.

The 5kg limit on our express option comes from the satchels -- we offer both regular express parcels, as well as the Australia Post express satchel option. This is mainly due to the massive pricing on express parcels. For example, a 5kg express post satchel will cost $20.85 anywhere in Australia, but express post parcels range from $17.20 all the way to $112.45. Yes, that's the extreme ranges, but options nonetheless, and with prices like that, many of our clients naturally want to save on the postage cost.

As for the 22kg limit -- yes, 20kg is the standard Australia Post weight limit, but with a contract they allow up to 22kg.

I hope you can understand now why we are looking to fix this little problem.

  • Tija
16 Sep 2011, 8:40 AM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Hide shipping method when order exceeds certain weight

MortalWombat:

I hope you can understand now why we are looking to fix this little problem.

The fix is quite simple, and Ajeh has actually already given the solution, albeit with incorrect values for your needs (he says very cautiously).

Make sure that you are putting that code in the copy of the Table Rate table shipping module that you do not want to show when the weight is over FIVE Kg, ...

And the change you need to make will be...

// disable only when entire cart is free shipping     if (zen_get_shipping_enabled($this->code)) {       $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);     }     
if (!IS_ADMIN_FLAG) {      
global $cart;      
if ($_SESSION['cart']->weight > 5 ) {        
$this->enabled = false;       
}     }     
if ($this->enabled) {
```Cheers
Rod
17 Sep 2011, 1:46 AM
#13
mortalwombat avatar

mortalwombat

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
131
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

Hi Rod and thanks.

I had changed the value of 22 to 5 when Ajeh supplied that code, but it wasn't removing the shipping option.

The reason was because I had this section of code below it:

    // check if manufacturers in cart
     if (IS_ADMIN_FLAG == false) {
        global $cart;
        $chk_manufacturer = $_SESSION['cart']->in_cart_check('manufacturers_id', '54');
$chk_manufacturers_id =  $chk_manufacturer;
        if ($chk_manufacturers_id > 0) {
          $this->enabled = false;
        } else {
          $this->enabled = true;
      }
    }

This is there because I use a courier for a brand of very large items.

Anyway, putting Ajeh's snippet below that, rather than above, fixed it up and the shipping option no longer shows when over the specified weight.

Thanks both of you for your help -- it's all a matter of learning what and where :)

  • Tija
17 Sep 2011, 1:56 AM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Hide shipping method when order exceeds certain weight

Thanks for the update that this is working and for explaining the changes that you needed ... :smile:

30 Jan 2012, 5:22 PM
#15
drziegler avatar

drziegler

New Zenner

Join Date:
Jan 2009
Posts:
5
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

The code Ajeh originally supplied can be modified as follows to disable the shipping method over or under a specified cart total:

if (!IS_ADMIN_FLAG) {
  global $cart;
  if ($_SESSION['cart']->total > 20 ) {
    $this->enabled = false;
  }
}

We use this on our site to disable Standard shipping for carts with totals over $20, which is our break point for offering free standard shipping (otherwise we end up with customers selecting and paying for standard shipping on carts over $20 and then complaining because we advertise free shipping).

31 Mar 2014, 12:28 PM
#16
dmagic avatar

dmagic

Totally Zenned

Join Date:
Oct 2008
Posts:
594
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

can some one help me with this code ? how can disable the 0$ ?

<?php
/**
 * @package shippingMethod
 * @copyright Copyright 2003-2006 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 6347 2007-05-20 19:46:59Z ajeh $
 */
/*
  USAGE
  By default, the module comes with support for 3 zones.  This can be
  easily changed by editing the line below in the zones constructor
  that defines $this->num_zones.
  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 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!
  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 zones2 {
    var $code, $title, $description, $enabled, $num_zones;
// class constructor
    function zones2() {
      $this->code = 'zones2';
      $this->title = MODULE_SHIPPING_ZONES2_TEXT_TITLE;
      $this->description = MODULE_SHIPPING_ZONES2_TEXT_DESCRIPTION;
      $this->sort_order = MODULE_SHIPPING_ZONES2_SORT_ORDER;
      $this->icon = '';
      $this->tax_class = MODULE_SHIPPING_ZONES2_TAX_CLASS;
      $this->tax_basis = MODULE_SHIPPING_ZONES2_TAX_BASIS;
      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_ZONES2_STATUS == 'True') ? true : false);
      }

      // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
      $this->num_zones = 4;
    }
// 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_zones; $i++) {
        $countries_table = constant('MODULE_SHIPPING_ZONES2_COUNTRIES_' . $i);
        $countries_table = strtoupper(str_replace(' ', '', $countries_table));
        $country_zones = split("[,]", $countries_table);
        if (in_array($dest_country, $country_zones)) {
          $dest_zone = $i;
          break;
        }
        if (in_array('00', $country_zones)) {
          $dest_zone = $i;
          break;
        }
      }
      if ($dest_zone == 0) {
        $error = true;
      } else {
        $shipping = -1;
        $zones_cost = constant('MODULE_SHIPPING_ZONES2_COST_' . $dest_zone);
        $zones_table = split("[:,]" , $zones_cost);
        $size = sizeof($zones_table);
        $done = false;
        for ($i=0; $i<$size; $i+=2) {
          switch (MODULE_SHIPPING_ZONES2_METHOD) {
           case (MODULE_SHIPPING_ZONES2_METHOD == 'Weight'):
              if (round($shipping_weight,9) <= $zones_table[$i]) {
                $shipping = $zones_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_ZONES2_TEXT_UNITS . ')';
                  break;
                default:
                  $show_box_weight = ' (' . $shipping_num_boxes . ' x ' . number_format($shipping_weight,2) . MODULE_SHIPPING_ZONES2_TEXT_UNITS . ')';
                  break;
                }
//                $shipping_method = MODULE_SHIPPING_ZONES2_TEXT_WAY . ' ' . $dest_country . (SHIPPING_BOX_WEIGHT_DISPLAY >= 2 ? ' : ' . $shipping_weight . ' ' . MODULE_SHIPPING_ZONES2_TEXT_UNITS : '');
                $shipping_method = MODULE_SHIPPING_ZONES2_TEXT_WAY . ' ' . $dest_country . $show_box_weight;
                $done = true;
        if (strstr($zones_table[$i+1], '%')) {
          $shipping = ($zones_table[$i+1]/100) * $order_total_amount;
        } else {
          $shipping = $zones_table[$i+1];
        }
                break;
             }
           break;
           case (MODULE_SHIPPING_ZONES2_METHOD == 'Price'):
// shipping adjustment
              if (($_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices()) <= $zones_table[$i]) {
                $shipping = $zones_table[$i+1];
                $shipping_method = MODULE_SHIPPING_ZONES2_TEXT_WAY . ' ' . $dest_country;
        if (strstr($zones_table[$i+1], '%')) {
          $shipping = ($zones_table[$i+1]/100) * $order_total_amount;
        } else {
          $shipping = $zones_table[$i+1];
        }
                $done = true;
                break;
             }
           break;
           case (MODULE_SHIPPING_ZONES2_METHOD == 'Item'):
// shipping adjustment
              if (($total_count - $_SESSION['cart']->free_shipping_items()) <= $zones_table[$i]) {
                $shipping = $zones_table[$i+1];
                $shipping_method = MODULE_SHIPPING_ZONES2_TEXT_WAY . ' ' . $dest_country;
                $done = true;
        if (strstr($zones_table[$i+1], '%')) {
          $shipping = ($zones_table[$i+1]/100) * $order_total_amount;
        } else {
          $shipping = $zones_table[$i+1];
        }
                break;
             }
           break;
          }
          if ($done == true) {
            break;
          }
        }
        if ($shipping == -1) {
          $shipping_cost = 0;
          $shipping_method = MODULE_SHIPPING_ZONES2_UNDEFINED_RATE;
        } else {
          switch (MODULE_SHIPPING_ZONES2_METHOD) {
           case (MODULE_SHIPPING_ZONES2_METHOD == 'Weight'):
              // charge per box when done by Price
              $shipping_cost = ($shipping * $shipping_num_boxes) + constant('MODULE_SHIPPING_ZONES2_HANDLING_' . $dest_zone);
              break;
           case (MODULE_SHIPPING_ZONES2_METHOD == 'Price'):
              // don't charge per box when done by Price
              $shipping_cost = ($shipping) + constant('MODULE_SHIPPING_ZONES2_HANDLING_' . $dest_zone);
            break;
           case (MODULE_SHIPPING_ZONES2_METHOD == 'Item'):
              // don't charge per box when done by Item
              $shipping_cost = ($shipping) + constant('MODULE_SHIPPING_ZONES2_HANDLING_' . $dest_zone);
            break;
          }
        }
      }
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_ZONES2_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_ZONES2_SKIPPED, $dest_country)) {
        // don't show anything for this country
        $this->quotes = array();
      } else {
        if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_ZONES2_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_ZONES2_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 ZONES2 Method', 'MODULE_SHIPPING_ZONES2_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_ZONES2_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_ZONES2_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_ZONES2_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_ZONES2_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_ZONES2_SKIPPED', '', 'Disable for the following Countries:', '6', '0', 'zen_cfg_textarea(', now())");
      for ($i = 1; $i <= $this->num_zones; $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_ZONES2_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_ZONES2_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 ('Zone " . $i ." Handling Fee', 'MODULE_SHIPPING_ZONES2_HANDLING_" . $i."', '0', 'Handling Fee for this shipping zone', '6', '0', now())");
      }
    }
    function remove() {
      global $db;
      $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
    }
    function keys() {
      $keys = array('MODULE_SHIPPING_ZONES2_STATUS', 'MODULE_SHIPPING_ZONES2_METHOD', 'MODULE_SHIPPING_ZONES2_TAX_CLASS', 'MODULE_SHIPPING_ZONES2_TAX_BASIS', 'MODULE_SHIPPING_ZONES2_SORT_ORDER', 'MODULE_SHIPPING_ZONES2_SKIPPED');
      for ($i=1; $i<=$this->num_zones; $i++) {
        $keys[] = 'MODULE_SHIPPING_ZONES2_COUNTRIES_' . $i;
        $keys[] = 'MODULE_SHIPPING_ZONES2_COST_' . $i;
        $keys[] = 'MODULE_SHIPPING_ZONES2_HANDLING_' . $i;
      }
      return $keys;
    }
  }
?>
31 Mar 2014, 12:51 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: Hide shipping method when order exceeds certain weight

Could you be more specific on what you are asking?

31 Mar 2014, 2:44 PM
#19
ajeh avatar

ajeh

Oba-san

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

Re: Hide shipping method when order exceeds certain weight

You are most likely getting the $0.00 shipping based on your Zone rates that you have set ...

Without knowing those settings, it is hard to determine when to turn off the Zone rate module that you have setup for this ...

It would help if you posted what you see in the Right Panel when you go to Modules ... Shipping ... and click on that Zone rate module you are using ...

31 Mar 2014, 5:06 PM
#20
dmagic avatar

dmagic

Totally Zenned

Join Date:
Oct 2008
Posts:
594
Plugin Contributions:
0

Re: Hide shipping method when order exceeds certain weight

Ajeh:

You are most likely getting the $0.00 shipping based on your Zone rates that you have set ...

Without knowing those settings, it is hard to determine when to turn off the Zone rate module that you have setup for this ...

It would help if you posted what you see in the Right Panel when you go to Modules ... Shipping ... and click on that Zone rate module you are using ...

This what we set

1:5.99, 80:5.99, 101:8.49,170:8.49,200:10.99,270:10.99,300:13.49,365:13.49,400:15.99,465:14.99:500:18.49,555:18.49, 600:20.99,655:20.99,700:23.49,750:23.49,800:25.99,850:25.99,900:28.49,950:28.49,1000:30.99,1050:30.99,1100:33.49,1145:33.49, 1200:35.99,1245:35.99,1300:38.49,1340:38.49,1400:40.99,1440:40.99,1500:43.49,1530:43.49,1600:45.99,1625:45.99, 1700:48.49,1720:48.49,1800:50.99,1815:50.99,1899:53.49

After 1899 grams it's show 0$

I want disable the checkbox after 1899grams . so the buyer can't choose this option .