Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Different UPS shipping options based on Zip/State/?

Different UPS shipping options based on Zip/State/?

Locked

Views: 1,246

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
20 Nov 2009, 6:33 PM
#1
jcit avatar

jcit

New Zenner

Join Date:
Nov 2009
Posts:
6
Plugin Contributions:
0

Different UPS shipping options based on Zip/State/?

I've searched the threads, but haven't found a solution to this (seemingly simple) problem:

We want to offer UPS Ground shipping as an option only for California (in addition to Overnight & 2nd Day). All other states/zips should only have Overnight & 2nd Day as options.

Yes, we have a UPS account and can pull the Overnight & 2nd Day costs, just can't seem to get Ground to come up for CA only.

Any help would be much appreciated!

Thanks,
Jeff

20 Nov 2009, 7:21 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Different UPS shipping options based on Zip/State/?

You could customize the ups.php shipping module with something like:

      for ($i=0; $i<$qsize; $i++) {
        list($type, $cost) = each($upsQuote[$i]);
        // BOF: UPS USPS
        if ($type=='STD') {
          if ($std_rcd) continue;
          else $std_rcd = true;
        }
        if (!in_array($type, $allowed_methods)) continue;
        // EOF: UPS USPS

        // Show UPS Ground only for California
        if (($order->delivery['country']['id'] == 223 && $order->delivery['zone_id'] == 12)) {
          $show_ground= true;
        } else {
          $show_ground= false;
        }
      
        if ($type == 'GND' && !$show_ground) {
          // show nothing
        } else {
          $methods[] = array('id' => $type,
                             'title' => $this->types[$type],
                             'cost' => (($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes) + $inspection_fee);
        }
      }
20 Nov 2009, 8:14 PM
#3
jcit avatar

jcit

New Zenner

Join Date:
Nov 2009
Posts:
6
Plugin Contributions:
0

Re: Different UPS shipping options based on Zip/State/?

Brilliant! I still need to run a few tests, but that looks to be the ticket.

Many thanks!