To be safe and ensure that you have accounted for the Tare Rate, just change the function quote to read:
Code:
// class methods
function quote($method = '') {
global $order;
// don't show when weight < 2
$this->quote = array();
$check_order_weight = round($_SESSION['cart']->show_weight(),9);
if ($check_order_weight < 2) {
$this->enabled = false;
}
if ($this->enabled) {
$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;
}
If you do not want to use the Tare rate as part of this, then customize the code in the function flat and just before the closing bracket of the function add:
Code:
// don't show when weight < 2
global $shipping_weight;
$check_order_weight = $shipping_weight;
if ($check_order_weight < 2) {
$this->enabled = false;
}
Bookmarks