If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Currencies & Sales Taxes, VAT, GST, etc. / Enable / Disable shipping module on checkout

Enable / Disable shipping module on checkout

Started by probtc on 3 Mar 2013, 10:02 AM · Views: 1,780

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

Post #1 by 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 ?

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

limelites

Totally Zenned

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

Post #2 by limelites

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

Post #3 by rodg

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

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.