Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

UPS U.S. State exclusion


Amylola

Recommended Posts

Hi, this is my first time posting to the Forum and I'm hoping someone out there can help me. I manage a site for a wine seller here in California and we can't ship via UPS to Virginia. Anyone know how to exclude particular states from the UPS shipping option? Any help would be GREATLY appreciated. Cheers!

Link to comment
Share on other sites

Here's the approach.

 

In includes/modules/shipping/ups.php, theres the line (around line 26):

 

      $this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true : false);

Right after this you would want to test on the state and, if it was a state you didn't want to ship to, set $this->enabled to false. It would probably look something like this:

 

if ($order->delivery['state'] == 'Virginia') $this->enabled = false;

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...