If this is your first visit, check our documentation. To post, register or login.
Forums / Built-in Shipping and Payment Modules / Different shipping methods for different categories

Different shipping methods for different categories

Started by tylerd213 on 13 Mar 2008, 2:16 AM · Views: 107,884

Results 181 to 200 of 554
7 Dec 2009, 11:40 PM
#181
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Different shipping methods for different categories

Alright, so I still need help:(. I tried modifying the code for checking multiple categories for media mail, and applying that to the flat rate. This is what I tried:```
// test contents for Cases
$skip_free = false;
$chk_case = 0;
$chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56');
$chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60');
if ($chk_case != $_SESSION['cart']->count_contents()) {
$skip_free = true;
}
// disable for one master_categories_id
if ((IS_ADMIN_FLAG == false && $skip_free) {
$this->enabled = false;

8 Dec 2009, 1:24 AM
#182
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

If you don't have a line:
global $cart;

above that code, that may be all that is missing ...

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!

8 Dec 2009, 5:21 PM
#183
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Re: Different shipping methods for different categories

Here's what I tried```
// test contents for Cases
global $cart;
$skip_free = false;
$chk_case = 0;
$chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56');
$chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60');
if ($chk_case != $_SESSION['cart']->count_contents()) {
$skip_free = true;
}
// disable for above categories
if ((IS_ADMIN_FLAG == false && $skip_free) {
$this->enabled = false;
}

and it didn't work:frusty:.  Thanks again for your help on this!
-Matt
8 Dec 2009, 7:25 PM
#184
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

Where in the code did you add this?

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 Dec 2009, 5:30 PM
#185
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Re: Different shipping methods for different categories

I simply added that code in place of this code```
// disable for one master_categories_id
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','56')) > 0) {
$this->enabled = false;
}

10 Dec 2009, 7:12 PM
#186
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

Let's try this ...

Can you just post the whole code so there isn't any confusion here ... there are a lot of ways to use this code and it seems to me either you are in the wrong place or the code is off a bit ... :unsure:

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 Dec 2009, 9:54 PM
#187
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Re: Different shipping methods for different categories

Alright, here is the entire file.```

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2004 The zen-cart developers | // | | // | http://www.zen-cart.com/index.php | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.zen-cart.com/license/2_0.txt. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: flat.php 1969 2005-09-13 06:57:21Z drbyte $ // class flat { var $code, $title, $description, $icon, $enabled; // class constructor function flat() { global $order, $db; $this->code = 'flat'; $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE; $this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS; $this->tax_basis = MODULE_SHIPPING_FLAT_TAX_BASIS; // disable only when entire cart is free shipping if (zen_get_shipping_enabled($this->code)) { $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false); } // test contents for Cases global $cart; $skip_free = false; $chk_case = 0; $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56'); $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60'); if ($chk_case != $_SESSION['cart']->count_contents()) { $skip_free = true; } // disable for above categories if ((IS_ADMIN_FLAG == false && $skip_free) { $this->enabled = false; } if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) { $check_flag = false; $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FLAT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while (!$check->EOF) { if ($check->fields['zone_id'] < 1) { $check_flag = true; break; } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } $check->MoveNext(); } if ($check_flag == false) { $this->enabled = false; } } } // class methods function quote($method = '') { global $order; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_FLAT_TEXT_WAY, 'cost' => MODULE_SHIPPING_FLAT_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); 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_FLAT_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 Flat Shipping', 'MODULE_SHIPPING_FLAT_STATUS', 'True', 'Do you want to offer flat 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, date_added) values ('Shipping Cost', 'MODULE_SHIPPING_FLAT_COST', '5.00', 'The shipping cost for all orders using this shipping method.', '6', '0', 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_FLAT_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_FLAT_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, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_FLAT_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', 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_FLAT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); } function remove() { global $db; $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_SHIPPING_FLAT_STATUS', 'MODULE_SHIPPING_FLAT_COST', 'MODULE_SHIPPING_FLAT_TAX_CLASS', 'MODULE_SHIPPING_FLAT_TAX_BASIS', 'MODULE_SHIPPING_FLAT_ZONE', 'MODULE_SHIPPING_FLAT_SORT_ORDER'); } } ?>
11 Dec 2009, 2:00 AM
#188
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

This line will not work well in the Flat Rate flat shipping module ... :eek:

          $this->enabled = ((MODULE_SHIPPING[B]_ITEM_[/B]STATUS == 'True') ? true : false);

Try using FLAT instead of ITEM ... :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!

11 Dec 2009, 5:00 PM
#189
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Re: Different shipping methods for different categories

So I tried fixing that, and it still doesn't work. When I try to load the actual shipping page, it just comes up blank. When I load the admin shipping module it says there is an error on this line:```
if ((IS_ADMIN_FLAG == false && $skip_free)

Here is that section of my code:

// class constructor
function flat() {
global $order, $db;

  $this->code = 'flat';
  $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE;
  $this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER;
  $this->icon = '';
  $this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS;
  $this->tax_basis = MODULE_SHIPPING_FLAT_TAX_BASIS;

  // disable only when entire cart is free shipping 
  if (zen_get_shipping_enabled($this->code)) { 
      $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false); 
  } 
  // test contents for Cases
   global $cart;  
    $skip_free = false;
    $chk_case = 0;
    $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56');
    $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60');
    if ($chk_case != $_SESSION['cart']->count_contents()) {
      $skip_free = true;
    }
  // disable for above categories 
  if ((IS_ADMIN_FLAG == false && $skip_free) { 
      $this->enabled = false;
  }
11 Dec 2009, 6:31 PM
#190
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

This line:

      if ((IS_ADMIN_FLAG == false && $skip_free) { 

is missing a closing paren ...

      if ((IS_ADMIN_FLAG == false && $skip_free)) { 

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!

11 Dec 2009, 6:41 PM
#191
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

To fix this for the Admin add to the code:

        if (IS_ADMIN_FLAG == false) {
          $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56');
          $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60');
          if ($chk_case != $_SESSION['cart']->count_contents()) {
            $skip_free = true;
          }
        }

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!

12 Dec 2009, 4:45 PM
#192
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Re: Different shipping methods for different categories

Another new error on the admin page. This time it was on line 46 which is $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56'); Here is that whole section```
// class constructor
function flat() {
global $order, $db;

  $this->code = 'flat';
  $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE;
  $this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER;
  $this->icon = '';
  $this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS;
  $this->tax_basis = MODULE_SHIPPING_FLAT_TAX_BASIS;

  // disable only when entire cart is free shipping 
  if (zen_get_shipping_enabled($this->code)) { 
      $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false); 
  } 
  // test contents for Cases
   global $cart;  
    $skip_free = false;
    $chk_case = 0;
    $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56');
    $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60');
    if ($chk_case != $_SESSION['cart']->count_contents()) {
      $skip_free = true;
    }
  // disable for above categories 
  if ((IS_ADMIN_FLAG == false && $skip_free)) { 
      $this->enabled = false;
  }
Also, now when I do a test through my site, flat rate seems to just be gone for all categories.  Thanks again for all your help.
12 Dec 2009, 5:09 PM
#193
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Re: Different shipping methods for different categories

I added the code that you posted just above my previous post. And it did resolve the admin issue. But Flat Rate is simply disabled for everything now. Here's what I have.```
// class constructor
function flat() {
global $order, $db;

  $this->code = 'flat';
  $this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE;
  $this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER;
  $this->icon = '';
  $this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS;
  $this->tax_basis = MODULE_SHIPPING_FLAT_TAX_BASIS;

  global $cart;
  if (IS_ADMIN_FLAG == false) {
      $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56');
      $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60');
      if ($chk_case != $_SESSION['cart']->count_contents()) {
        $skip_free = true;
      }
    }
12 Dec 2009, 5:33 PM
#194
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

To make Flat Rate flat not show when on products from categories_id 56 and 60 are in the cart, use this:

      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
      }
      // test contents for Cases
       global $cart;
        $skip_free = false;
        $chk_case = 0;
        if (IS_ADMIN_FLAG == false) {
          $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56');
          $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60');
[B]          if ($chk_case > 0  && ($chk_case != $_SESSION['cart']->count_contents())) {
[/B]            $skip_free = true;
          }
        }
//echo 'FLAT : ' . $chk_case . '<br>';
      // disable for above categories
      if ((IS_ADMIN_FLAG == false && $skip_free)) {
          $this->enabled = false;
      }

      if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {

I added one more condition for when the cart doesn't contain anything from categories_id 56 and 60 ...

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!

12 Dec 2009, 6:22 PM
#195
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Re: Different shipping methods for different categories

I think we (I really mean you) have finally got it! My first test didn't come up with an admin error, and seemed to work correctly on the customer side of things too!! You are incredible! Thank you so much.:clap: I notice that my per item option is gone too. Is that somehow in that code, or just a strange side effect? I will do a little digging into that issue, but it's not a big issue because I want per item disabled for the same reasons.
Thanks again!

12 Dec 2009, 6:52 PM
#196
dapottster avatar

dapottster

New Zenner

Join Date:
Jul 2009
Location:
Crystal Lake, IL
Posts:
50
Plugin Contributions:
0

Re: Different shipping methods for different categories

I think I got it worked out. I forgot that I had the simple version, checking for one category, on the item option. I have updated it to the new code and so far everything seems to be working. Thanks again for all your help!

12 Dec 2009, 8:12 PM
#197
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

You are most welcome ... glad that this is working for you 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!

16 Dec 2009, 4:58 PM
#198
bfunk1972 avatar

bfunk1972

New Zenner

Join Date:
Nov 2009
Posts:
8
Plugin Contributions:
0

Re: Different shipping methods for different categories

is there any way to add more than one id to this code?

"in_cart_check('master_categories_id','66') > 0) )"

meaning, I want to add low order fee to category 66, but also to 67,68,69.

it there any way to do this?

thanks

17 Dec 2009, 2:28 PM
#199
ajeh avatar

ajeh

Oba-san

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

Re: Different shipping methods for different categories

If you look at the code, what it is doing is checking two categories based on the master_categories_id in the products table:

          $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','56');
          $chk_case += $_SESSION['cart']->in_cart_check('master_categories_id','60');

and storing the value to:
$chk_case

It then checks if that value is the number of items in the cart to indicate that it is the only kind of Products in the cart:

          if ($chk_case > 0  && ($chk_case != $_SESSION['cart']->count_contents())) {

Now what you do with the results of the count is up to you ...

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!

17 Dec 2009, 7:36 PM
#200
bfunk1972 avatar

bfunk1972

New Zenner

Join Date:
Nov 2009
Posts:
8
Plugin Contributions:
0

Re: Different shipping methods for different categories

Thanks for your response.
I'm new to Zen so I'm not sure I gave enough info.
What I basically want to do it to be able to have only certain categories that add the low order fee.
So if I have 20 categories and only 5 are going to offer the low order fee, I can add those categories to the code within the file.

here is what I have now, but it only adds the fee to one category.

// if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) < MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) {
if ( ($pass == true) && ($_SESSION['cart']->in_cart_check('master_categories_id','4')> 0) ) {
$charge_it = 'true';

Any help would be greatly appreciated.
Thanks.