Is there a way to hide a shipping method of an order is over a certain weight? I am shipping some small items and if they are under a certain weight they can go lettermail which is quite cheap. I am using the table rate for the lettermail since there are a few weight/price levels. The problem is that if their order goes over the max lettermail rate, my alternate shipping option shows, but lettermail is still showing as well, but with a cost of $0.00! Is there some code I can add into my table.php file to hide it if the order is over a certain weight?
I tried this but no luck:
The bolded part is what I added. I've tried a few variations of it too, but I know I must be missing something significant. There are no errors during checkout with that code added, but it doesn't change anything either, the lettermail cost still shows as $0.00.$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 ($shipping_weight > "0.5") {
$this->enabled = false;}
If anyone can point me to what I'm missing in the code I would really appreciate it!
TIA!






Bookmarks