includes/modules/shipping/table.php ...
(FTP a copy to your local drive as a backup).
around LINE 50 in the ORIGINAL file:
Code:
$this->code = 'table';
$this->title = MODULE_SHIPPING_TABLE_TEXT_TITLE;
$this->description = MODULE_SHIPPING_TABLE_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_TABLE_TAX_CLASS;
$this->tax_basis = MODULE_SHIPPING_TABLE_TAX_BASIS;
// 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 ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLE_ZONE > 0) ) {
$check_flag = false;
Insert the bit in RED:
Code:
$this->code = 'table';
$this->title = MODULE_SHIPPING_TABLE_TEXT_TITLE;
$this->description = MODULE_SHIPPING_TABLE_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_TABLE_TAX_CLASS;
$this->tax_basis = MODULE_SHIPPING_TABLE_TAX_BASIS;
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
}
// final check for display of Table Options for WEIGHT conditions
if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() > 2) {
$this->enabled = false;
} else {
$this->enabled = true;
}
if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLE_ZONE > 0) ) {
$check_flag = false;
The Line: $_SESSION['cart']->show_weight() > 2) { basically says:
"If the cart weight is greater than 2"
Then enabling this module is FALSE.
Of course, you can make the module inactive for LESS THAN as well...
$_SESSION['cart']->show_weight() < 2) {
However... using an exact Integer causes an interesting situation when the cart is EXACTLY = 2, so give it a few decimals...
$_SESSION['cart']->show_weight() > 2.0001) {
$_SESSION['cart']->show_weight() < 1.9999) {
----------------------------------------------------------------------------------------------------------------------
PS: No override file system here... make sure you keep a note of what you've done