Post by marc_cole » Thu Feb 24, 2011 6:18 am

I'm sure this must have been discussed before, but I can't find it mentioned anywhere.

Using the core UPS module, is there a way to prevent a customer from choosing Next Day Air, 2nd Day Air, etc., if they are within 1 day Ground service from the shipping warehouse?

Thanks,
Marc
Last edited by marc_cole on Tue Mar 01, 2011 9:55 am, edited 1 time in total.

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by marc_cole » Sat Feb 26, 2011 12:09 am

I sure hope that the lack of responses to this doesn't mean that it's not possible. I'd hate to have customers charged for something that they don't need.

Since the origin Zip Code is entered in the UPS module, you'd think that it would be compared against the ship to Zip and return only the viable choices.

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by marc_cole » Tue Mar 01, 2011 2:41 am

I'd really like to finally take our store live, so I'd appreciate some help with this. If this capability is not built-in to the core, can someone who knows the PHP help me get started?

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by Xsecrets » Wed Mar 02, 2011 2:56 am

no it's not built into the core, and I have a feeling it's going to be rather difficult to implement, because the other options are viable options. UPS will glady accept 2da for something that is within the 1dg area. All opencart can do is send the delivery address and shipping address information to the ups api and display what it gets back. I suppose if you took the time to build some sort of table of all the zip codes that fall within the 1dg delivery area you could then hack the heck out of the module to do some sort of a comparison and only display the ground option. Honestly I've never been asked this question in over 6 years of building online stores.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by marc_cole » Wed Mar 02, 2011 3:23 am

Thanks for responding.
Xsecrets wrote:I have a feeling it's going to be rather difficult to implement, because the other options are viable options. ... All opencart can do is send the delivery address and shipping address information to the ups api and display what it gets back. I suppose if you took the time to build some sort of table of all the zip codes that fall within the 1dg delivery area you could then hack the heck out of the module to do some sort of a comparison and only display the ground option.
Our present cart does exactly that. It uses a lookup table that stores a list of Zip Codes (just the first 3 digits) and the corresponding UPS zones, and then the calc compares the two zones and determines the "available" shipping types.
Xsecrets wrote:Honestly I've never been asked this question in over 6 years of building online stores.
Well, there's always a first time for everything, isn't there? ;) Seriously, though, why should a customer have the option to choose 3 day shipping when ground will be next day anyway? If you're a business owner, you should know by now that end users will choose something they shouldn't simply because it's there. :-\

To be fair to my customers, we're based in Seattle and this supplier is based in NY, so people on the East Coast think the items will ship from us and they want it quicker than the 5+ days cross country. I simply want to prevent as many headaches as I can, so I need to find a way to do this.

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by Qphoria » Wed Mar 02, 2011 4:14 am

USA has a somewhat conforming zipcode system where the first 2 or 3 characters typically represent the state, but UPS has to work globally so that type of generalization isn't normal. There would need to be some sort of definition of what is considered to be a "local" shipping.

I suppose if you assume UPS Ground is local and you say something like:

if myzip = 901xx and the customer zip = 901xx then only show ground?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by marc_cole » Wed Mar 02, 2011 5:10 am

Qphoria wrote:There would need to be some sort of definition of what is considered to be a "local" shipping.
I guess it depends on how you go about it. The lookup tables we use now look like this:

Code: Select all

003,--
004,2
005,2
006,45
007,45
008,--
009,45
...
505,6
506,5
507,5
508,6
...
where the numbers on the left of the comma are the first 3 digits of the Zip, and on the right is the zone. If there's a double dash, it means to ignore that particular zone for that shipping choice and so is not shown in the pull down menu of shipping options.

Not sure if that's the best way to go about it in OC, but by using zones, it should be pretty straight forward —
example:
• Zone 2 would show only Ground
• Zone 3 would show Ground and Next Day Air
• Zone 4 would show Ground, Next Day Air, and 2nd Day Air
etc.

It appears that this would be done in admin/controller/shipping/ups.php? Getting started is always the hardest part for me, so any help would be greatly appreciated.

Attachments

UPS_Map_NY.gif

UPS_Map_NY.gif (12.85 KiB) Viewed 5504 times


OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by Xsecrets » Wed Mar 02, 2011 5:47 am

so you would have that complete table for every possible shipping option? that seems kind of crazy. The next issue you'll run into is that opencart doesn't have any idea of zones per shipping option only per shipping module. as a matter of fact opencart and every other cart I've ever used really doesn't have an idea of shipping options, other than a list of which ones you accept. It just submits address data to ups and displays the array they send back.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by marc_cole » Wed Mar 02, 2011 6:35 am

Xsecrets wrote:so you would have that complete table for every possible shipping option?
Every option that we use, yes.
Xsecrets wrote:that seems kind of crazy.
Hey, it works — but if you have a better idea, I'm all ears.
Xsecrets wrote:The next issue you'll run into is that opencart doesn't have any idea of zones per shipping option only per shipping module.
I realize all this. I'll need to set up lookup tables or use some other method. I was hoping someone here would have some good ideas on how I could go about coding this.
Xsecrets wrote:as a matter of fact opencart and every other cart I've ever used really doesn't have an idea of shipping options, other than a list of which ones you accept. It just submits address data to ups and displays the array they send back.
Are you saying that this can't be done in PHP? Am I stuck with my Perl cart because of this?

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by Qphoria » Wed Mar 02, 2011 6:54 am

Better idea would be my idea :) compare the first 3 and if they match, only show local.
Or
On the shipping page, explain to people that you are located in seattle. If they are located in seattle, they should be smart enough to realize they should choose local

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Wed Mar 02, 2011 7:01 am

marc_cole wrote: Are you saying that this can't be done in PHP? Am I stuck with my Perl cart because of this?
absolutely not. Just that I'm not sure the best way. I'm guessing you would have to take the returned array of quotes and loop through it doing all your checks and unset that key if it doesn't pass or something like that. Just seems like a huge pain.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by marc_cole » Wed Mar 02, 2011 7:23 am

Xsecrets wrote: Just seems like a huge pain.
Agreed.

Is there a way to have UPS return the zone of the Ship To address? I echoed out the result of curl_exec($ch) and got this:

Code: Select all

Bare Bones Rate Request1.00011Success03Your invoice may vary from the displayed reference ratesLBS30.0USD18.50USD0.00USD18.50USD18.50USD0.00USD18.5030.0LBS30.012Your invoice may vary from the displayed reference ratesLBS30.0USD33.99USD0.00USD33.993USD33.99USD0.00USD33.9930.0LBS30.002Your invoice may vary from the displayed reference ratesLBS30.0USD43.56USD0.00USD43.562USD43.56USD0.00USD43.5630.0LBS30.013Your invoice may vary from the displayed reference ratesLBS30.0USD59.68USD0.00USD59.681USD59.68USD0.00USD59.6830.0LBS30.014Your invoice may vary from the displayed reference ratesLBS30.0USD102.69USD0.00USD102.6918:00 A.M.USD102.69USD0.00USD102.6930.0LBS30.001Your invoice may vary from the displayed reference ratesLBS30.0USD68.59USD0.00USD68.59110:30 A.M.USD68.59USD0.00USD68.5930.0LBS30.0
I also echoed out $xml and got this:

Code: Select all

7D1B515986514785	marc_cole	631TT8c	 Bare Bones Rate Request	 1.0001	 Rate	 shop	 11 04
Windsor	 NY	 US	 12553
Seattle	 WA	 US	 98121
Windsor	 NY	 US	 12553
02	 LBS	 30
If this is "bare bones", there must be a way to return more info, possibly with the Ship To zone. If we could get UPS to return the zone, then we could take that and figure which shipping choices to show, no?

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by marc_cole » Wed Mar 02, 2011 7:36 am

Qphoria wrote:Better idea would be my idea :) compare the first 3 and if they match, only show local.
If only it was that simple! Zones that would be 2 days by Ground should have the option of Next Day Air, but not 2nd Day Air. Zones that are 3 days by Ground should be able to choose Ground, Next Day Air, and 2nd Day Air, but not 3 Day Select. And the list goes on...
Qphoria wrote:On the shipping page, explain to people that you are located in seattle. If they are located in seattle, they should be smart enough to realize they should choose local
I'm sure you run across this yourself, but people just don't read. Sad but true. :'(

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by Xsecrets » Wed Mar 02, 2011 12:16 pm

so where does your perl cart get it's data?

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by marc_cole » Wed Mar 02, 2011 12:26 pm

You can create your own calcs on-the-fly, so I just used the downloadable zone chart from UPS and made the lookup tables from that.

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by marc_cole » Fri Mar 04, 2011 2:20 am

Does anyone know how to retrieve more than the 'Bare Bones Rate Request' from UPS?

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by marc_cole » Sat Mar 05, 2011 4:51 am

So what did I do — stump the experts with this one? ;)

EDIT: Just in case it came across that way, I wasn't trying to be sarcastic.
Last edited by marc_cole on Sat Apr 02, 2011 2:44 am, edited 1 time in total.

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by marc_cole » Thu Mar 10, 2011 9:18 am

Someone? Anyone???

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by colt1911 » Sat Oct 29, 2011 3:37 am

Has anyone developed any mods for this issue from 7 months ago? My client has the same need. They are a food company, and customers from certain US states must choose 2 day UPS delivery. Customers in other, closer states should have a choice of ground, 3-day or 2-day.

It would be great if someone could select "California" and have UPS 2-Day Shipping be the only thing that comes up, as opposed to NY, where Ground, 2-Day and 3-Day Select show up. The "Zone" structure would be great...

New member

Posts

Joined
Sat Sep 24, 2011 1:23 am
Who is online

Users browsing this forum: No registered users and 38 guests