Just wanted to share something, in case anyone else runs into this in the future.
I have 3 shipping methods active:
- Free Pickup
- UPS Shipping Module
- Per Weight Unit
Now, if UPS can handle the order, I don't want the "Per Weight Unit" option to show because the total usually comes to less than UPS, which is what I use to ship anyways.
I actually just had an order come through on a $20 item, where the UPS quote was $35, and the customer selected "Per Weight Unit" of $15, in effect making the total order equal to the shipping cost. Of course, I would lose money on this if I fulfilled the order. So you see my problem.
But being that I do get orders over the 150lb UPS weight limit, I need something to give them a quote. Even if it's off by a bit, I can let the larger orders eat into my profit a bit to close the sale.
But I'm rambling, so here's what I did:
In includes/modules/shipping/perweightunit.php add the following code
PHP Code:
// disable if UPS module can handle shipping cost, i.e. order is less than 150 lbs
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = (($_SESSION['cart']->show_weight() > 150) ? true : false);
}
after:
PHP Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_PERWEIGHTUNIT_STATUS == 'True') ? true : false);
}
And voila! Hope this keeps someone from
Bookmarks