Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / Enable / Disable shipping module on checkout

Enable / Disable shipping module on checkout

Views: 1,762

Results 1 to 3 of 3
3 Mar 2013, 10:02 AM
#1
probtc avatar

probtc

New Zenner

Join Date:
May 2012
Location:
SOUTH KOREA
Posts:
21
Plugin Contributions:
0

Enable / Disable shipping module on checkout

Hi,

I have afew shipping modules on Zen cart 1.51. And I want to make it disable if the order is under $200.
How can I make the shipping module disable on checkout if the order is under $200 ?

3 Mar 2013, 1:40 PM
#2
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Enable / Disable shipping module on checkout

Most of the shipping modules have built in settings where you can disable them based on order value. Just go to your admin/modules/shipping area and change the settings for the shipping module you're trying to disable. Click the shipping module and select "Edit"

4 Mar 2013, 11:12 AM
#3
rodg avatar

rodg

Deceased

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

Re: Enable / Disable shipping module on checkout

probtc:

Hi,

I have afew shipping modules on Zen cart 1.51. And I want to make it disable if the order is under $200.
How can I make the shipping module disable on checkout if the order is under $200 ?

Somewhere near the beginning of most/all shipping modules you'll find a piece of code that reads like:


if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
}

Shortly after this code, you'll need to add the following:


$order_total_amount = $_SESSION['cart']->show_total() ;
if ($order_total_amount < 200) $this->enabled = 'false' ;

Cheers
Rod