Is there a way to disable UPS Ground to 8 states and only allow them the option of Priority Mail or UPS 3 Day Select? (shipping live plants)
Is there a way to disable UPS Ground to 8 states and only allow them the option of Priority Mail or UPS 3 Day Select? (shipping live plants)
To turn off the display of Ground shipping in the UPS shipping module for specific states, you could change the code from:
to read:Code:$cost = preg_replace('/[^0-9.]/', '', $cost); $methods[] = array('id' => $type, 'title' => $this->types[$type], 'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING) ); } $this->quotes['methods'] = $methods;
Code:$cost = preg_replace('/[^0-9.]/', '', $cost); // bof: Disable Ground for specific states //echo 'UPS TYPE ' . $type . '<br>'; if (in_array(strtoupper($order->delivery['state']), array('OHIO', 'NEW YORK') ) && $type == 'GND') { // skip display } else { $methods[] = array('id' => $type, 'title' => $this->types[$type], 'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING) ); } // eof: Disable Ground for specific states } $this->quotes['methods'] = $methods;
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Thank you very much!
You are most welcome ... glad that this is working for you ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Bookmarks