If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / UPS module - let UPS determine residential or commercial???

UPS module - let UPS determine residential or commercial???

Started by goldbuckle on 2 Apr 2012, 9:52 PM · Views: 2,325

Results 1 to 2 of 2
2 Apr 2012, 9:52 PM
#1
goldbuckle avatar

goldbuckle

Zen Follower

Join Date:
Dec 2006
Location:
near Atlanta Georgia
Posts:
220
Plugin Contributions:
0

UPS module - let UPS determine residential or commercial???

Is it possible to set up the UPS shipping module to let UPS determine if the address is a residential or commercial address??? And if so can it also be set up this way in the shipping estimator? I wouldn't want a customer to estimate shipping then get to checkout and find it higher because of the address type....just saying....

Best,
Goldbuckle

3 Apr 2012, 2:45 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: UPS module - let UPS determine residential or commercial???

You could try customizing the code in UPS and change the function _upsRescom to read:

  function _upsRescom($foo) {
    global $order;
/*
    switch ($foo) {
      case 'RES': // Residential Address
        $this->_upsResComCode = '1';
        break;
      case 'COM': // Commercial Address
        $this->_upsResComCode = '0';
        break;
    }
*/

//echo 'UPS company: ' . ($order->delivery['company'] == '' ? 'No company' : 'Got a company') . ' len:' . strlen($order->delivery['company']) . '<br>';
    if ($order->delivery['company'] == '') {
        $this->_upsResComCode = '1';
    } else {
        $this->_upsResComCode = '0';
    }

  }

Now if there is a company name it will switch to commercial ...

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!]
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!