jasonabc Posted July 9, 2006 Posted July 9, 2006 Hi guys, If my orders are over 135lbs I need to switch the UPS option off and just present my table rate at checkout. Just wondered if anyone had stumbled on a contribution that does this? I could get the order weight from the db directly and stick a bit of logic in the shipping page but there's no point reinventing the wheel!! cheers Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Guest Posted July 9, 2006 Posted July 9, 2006 edit your ups.php the constructor, change this: // class constructor function ups() { global $order; to this // class constructor function ups() { global $order, $shipping_weight; then few lines down where you have: if ($check_flag == false) { $this->enabled = false; } } add beneath: if($shipping_weight> 135) $this->enabled = false; and you can make it a switch in the database for the module to control it from there.
jasonabc Posted July 9, 2006 Author Posted July 9, 2006 you're a legend ;-) Thanks dude! Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Guest Posted October 23, 2006 Posted October 23, 2006 Mark, That sounds like a great solution for that users application. I'm wondering if something similar can be done to restrict the display of UPS and USPS shipping options by either a short list of items (preferred) or a specific category, which are too big and heavy and can only ship by Fedex Freight. Any ideas on how to revise the class constrictor for UPS and USPS in that case? Thanks in advance for your reply and help. DP edit your ups.php the constructor, change this: // class constructor function ups() { global $order; to this // class constructor function ups() { global $order, $shipping_weight; then few lines down where you have: if ($check_flag == false) { $this->enabled = false; } } add beneath: if($shipping_weight> 135) $this->enabled = false; and you can make it a switch in the database for the module to control it from there.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.