Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fedex Zip Zones 1.3 released


wasson65

Recommended Posts

I've released a new version of the Fedex Zipcode Zone Rates contribution.

 

This release features Fedex Ground rates, and a bugfix that would ignore the user's selection and always give them the second cheapest value.... Odd, yes, but it's fixed now.

 

Also added a surcharge factor, so you can adjust the rates up by a percentage to cover the fuel surcharge that fedex imposed, or to hide/bury other handling or packaging costs.

 

You can get it here:

 

http://www.oscommerce.com/community/contributions,490

 

Known problems:

If you are shipping via ground to Hawaii, Puerto Rico, or Alaska, Fedex has a different zone. But the code assumes the zone will be the same for all types of fedex shipping, so the ground numbers to Hawaii, PR, and Alaska will be too low.

 

Enjoy,

 

Tim

Link to comment
Share on other sites

  • 4 weeks later...

Well I attempted to install this and here's the error message I'm getting when clicking 'Checkout':

 

1064 - You have an error in your SQL syntax near '>= pcode_from and <= pcode_to' at line 4



SELECT * FROM fedex_pcode_to_zone_xref WHERE >= pcode_from and <= pcode_to

 

Any ideas?

Link to comment
Share on other sites

It's apparent that it's looking for $zip from the $order. The only problem is is that there's no instance of the order class instantiated when the quote() method is called (which is causing the problem).

 

Is this a relic of running pre-new checkout code?

 

-chicken

Link to comment
Share on other sites

It's apparent that it's looking for $zip from the $order. The only problem is is that there's no instance of the order class instantiated when the quote() method is called (which is causing the problem).

 

Is this a relic of running pre-new checkout code?

 

-chicken

 

Short answer: yes.

 

It's possible to backport to the older codebase, but not something that's on my front burner at this time, so to speak.

 

Tim

Link to comment
Share on other sites

So...do i need to delete the alaska, hawaii, puerto rico info from my pdftext file ???

 

This would fix the problem, but there is another way, if you want to figure fedex outside the continental US.

 

The reason it's failing is because Fedex put an extra column of data in the AK/HW/PR zones - they have a zone for ground and a different zone for everything else if the zip falls outside the continental US.

 

So if you simply remove the extra column of Fedex ground zone info from the text file, it goes in fine. The downside is that if somebody picks fedex ground outside the continental US, it's not going to be accurate.

 

Now with that I've really gone and muddied the water.... 8-/

 

Tim

Link to comment
Share on other sites

  • 2 weeks later...

Hi Tim,

 

Nice mod!

 

I changed the descriptions in the db table "fedex_shiptype" in order to be more descriptive for our customers. I changed all 6 with only one hitch.

 

When I return to the store the last (most expensive) option is default selected with the radio button. When I revert the description of "FedEx Ground - please allow 21 days" back to "FedEx Ground" the top radio button is checked...as should be.

 

Why did this happen? (how does fedexshipzones.php determine which radio gets checked)?

 

(Now all have definitions with the exception of the first one, "FedEx Ground") :roll:

Link to comment
Share on other sites

Hi Tim,

 

Nice mod!

 

I changed the descriptions in the db table "fedex_shiptype" in order to be more descriptive for our customers.  I changed all 6 with only one hitch.

 

When I return to the store the last (most expensive) option is default selected with the radio button.  When I revert the description of "FedEx Ground - please allow 21 days" back to "FedEx Ground" the top radio button is checked...as should be.

 

Why did this happen? (how does fedexshipzones.php determine which radio gets checked)?

 

(Now all have definitions with the exception of the first one, "FedEx Ground")  :roll:

 

You'll need to go into fedexzipzones.php and look for an array around line 24. The array matches the long wordy description to the short code used in the radio buttons. The long wordy descriptions need to match what you've put in the database.

 

Tim

Link to comment
Share on other sites

ok i installed the fedex modules and everything seems fine but when i try to test it in hte shopping cart i get this error:

Warning: Invalid argument supplied for foreach() in /www/digital8depot.com/html/catalog/includes/modules/shipping/fedexzipzones.php on line 98

 

plus when i run the buildfedexdata.php i get this message at the end

 

1054 - Unknown column 'NA000' in 'field list'

 

INSERT INTO fedex_pcode_to_zone_xref ( pcode_from, pcode_to, zone_id ) VALUES (NA000, NA999, 10 )

 

is it cuz i don't have the Zone_Locator.txt is not formated the right way?

Link to comment
Share on other sites

ok i installed the fedex modules and everything seems fine but when i try to test it in hte shopping cart i get this error:

Warning: Invalid argument supplied for foreach() in /www/digital8depot.com/html/catalog/includes/modules/shipping/fedexzipzones.php on line 98

 

plus when i run the buildfedexdata.php i get this message at the end

 

1054 - Unknown column 'NA000' in 'field list'

 

INSERT INTO fedex_pcode_to_zone_xref ( pcode_from, pcode_to, zone_id ) VALUES (NA000, NA999, 10 )

 

is it cuz i don't have the Zone_Locator.txt is not formated the right way?

 

Your hunch is correct, the zone_locator.txt file is very particular. Try going in and removing all the alaska, hawaii, and Puerto Rico shipping rates. Silly fedex gives 2 zones for each zip code range, one for fedex ground, and one for everything else for the non-contiguous states, and this confuses the code, which expects a single zone for a given zip code range.

 

Compare your zone_locator.txt to the sample, and see what I mean.

 

Good Luck,

 

Tim

Link to comment
Share on other sites

  • 1 month later...

Hello,

 

I'm using the latest Fedex Zone V.2 contribution and would like to know how to get past the 150lbs. weight limit. Our site sells items that are not by themselves that heavy but when you start to combine all the items the weight can begin to exceed that amount quickly. Once the weight limit is reached no Fedex options are displayed.

 

Also get this error:

Warning: Invalid argument supplied for foreach() in /Users/Sites/my_site_name/includes/modules/shipping/fedexzipzones.php on line 110

 

I guess part of the problem is that the shipping calculation combines all the items in the customers cart and multiplies that by the total amount, usually displayed like (1 x 150 lb(s)).

 

Don't have a clue where to begin, so any help on this is appreciated.

 

Thanks in advance.

 

-----------------------

Environment

-----------------------

PHP 4.2.x

Linux/Apache

MySql 3.23.xx

OSC build Nov. 2002

Fedex Zone V.2 Contribution

osC details

osCommerce 2.2-MS2

PHP Version: 4.3.8 (Zend: 1.3.0)

Apache Release 10331100

MySQL 4.0.27-standard

Link to comment
Share on other sites

Found a possible bug in Fedex Contribution.

 

I have a customer in Australia, post code 4503 who has placed an order which weighs 30lbs and gets charged $13 shipping Fedex Ground. Is there some way that we can prevent international customers from being shown this option?

 

Thanks

Link to comment
Share on other sites

Hello,

 

I'm using the latest Fedex Zone V.2 contribution and would like to know how to get past the 150lbs. weight limit. Our site sells items that are not by themselves that heavy but when you start to combine all the items the weight can begin to exceed that amount quickly. Once the weight limit is reached no Fedex options are displayed.

 

Also get this error:

Warning: Invalid argument supplied for foreach() in /Users/Sites/my_site_name/includes/modules/shipping/fedexzipzones.php on line 110

 

I guess part of the problem is that the shipping calculation combines all the items in the customers cart and multiplies that by the total amount, usually displayed like (1 x 150 lb(s)).  

 

Don't have a clue where to begin, so any help on this is appreciated.

 

Thanks in advance.

 

-----------------------

Environment

-----------------------

PHP 4.2.x

Linux/Apache

MySql 3.23.xx

OSC build Nov. 2002

Fedex Zone V.2 Contribution

 

The fedex rate tables only go to 150 lbs. But OSC has a setting in the admin that controls the biggest package you will ship. If the weights go over that, it breaks it into several packages.

 

So if you set that smaller than 150, then OSC will split a 150 lb box into 2 smaller boxes, and it will show in the fedex contrib as (2x75), and it will calc the rate for a 75 lb package, and double it.

 

I do know that Fedex gives a break for multi-package orders going to the same place, so this method will probably overcharge a little bit on those multi-package orders.

 

Tim

Link to comment
Share on other sites

Found a possible bug in Fedex Contribution.

 

I have a customer in Australia, post code 4503 who has placed an order which weighs 30lbs and gets charged $13 shipping Fedex Ground. Is there some way that we can prevent international customers from being shown this option?

 

Thanks

 

I assume you mean you don't want the fedex options showing at all. The Fedex Zone contrib will only work with US.

 

So the fix should be to have the fedex contrib check the country, and only show options if it is US.

 

I don't have a fix right now, but I'll try to take a look at it in the next couple days.

 

Tim

Link to comment
Share on other sites

  • 1 year later...

I just installed v2.2 of the FedEx Zones Contribution and everything seemed to run smoothly, no errors on install or any visible errors for that matter.

 

But when I checkout using a real address I get a shipping price of $0.00 and it doesn't show the different shipping options (i.e. FedEx Ground, FedEx 2Day etc.). Also, the product weighs 42lbs as well so I know that's not the problem.

 

Any help would be greatly appreciated.

Link to comment
Share on other sites

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...