Jump to content
Sign in to follow this  
wasson65

Fedex Zone Contrib version 2.0 ready

Recommended Posts

I just installed this and I have an error:

Fatal Error: cannot redeclare class fedexzipzones...

catalog/includes/modules/shipping on line 16

 

can anyone help me with this?

 

Thanks so much

Share this post


Link to post
Share on other sites
I just installed this and I have an error:

Fatal Error: cannot redeclare class fedexzipzones...

catalog/includes/modules/shipping on line 16

 

can anyone help me with this?

 

Thanks so much

Hi,

 

Did you rename the old fedexzipzones.php? You must only have 1 copy of fedexzipzones.php in the modules/shipping folder. Delete all 'rename' copies. That should solve your problem.


- The Jackal

Share this post


Link to post
Share on other sites
Hi,

 

Did you rename the old fedexzipzones.php? You must only have 1 copy of fedexzipzones.php in the modules/shipping folder. Delete all 'rename' copies. That should solve your problem.

 

 

It's the only fedex file in there. I never had FedEx installed previously.

Share this post


Link to post
Share on other sites

Hi,

 

Could you go to your catalog/includes/modules/shipping folder and list all the files in that folder?

 

 

To everyone else,

 

The fuel surcharges is increased again:

 

As of Nov 2005, its 4.5% for Ground, 20% for Express.

 

Please update your rates accordingly in the Admin panel. See http://fedex.com/cgi-bin/fuelsurcharge.cgi...anguage=english.

Edited by TheJackal

- The Jackal

Share this post


Link to post
Share on other sites

Hi, first off great contribution! Thanks for all your hard work.

 

However, I am having a problem and I have no idea where to start.

 

Everything seemed to install, import and run just fine - the problem I am having is the shipping costs that it is calculating. During testing we added a product that weighed somewhere around 123 pounds, and here is what it came up with:

 

Home Delivery $8.56

Express Saver - 3 days $29.04

2nd Day $30.60

Standard Overnight - by 3PM $46.20

 

$9 to ship a 123 pounds?!! Seemed a little off. We looked it up on our clients shipping charts they got from Fedex and it should have been in the $110 shipping range. Any ideas where i went wrong? I can provide any info, I just didn't know where to start. I checked the zones chart i imported and that seemed fine, it imported correctly (no errors at least). I am currently quite lost.

 

Lastly, I realized that there is a limit of 150 pounds on this contribution - currently though, what happens when you exceed this limit? I am curious because this store has lots of heavy stuff. And while I am at it, one of the future features was to handle weights over 150 pounds - is there any progress/eta on that?

Share this post


Link to post
Share on other sites

Hi,

 

Did you use your ZIP code to generate the Zone_Locator.txt file? You cannot use the stock Zone_Locator.txt.

 

The size limit of 150 pounds is imposed by FedEx. They simply do not ship more than 150 lbs for a single package. For those, you might have to use Freight services.

Edited by TheJackal

- The Jackal

Share this post


Link to post
Share on other sites
Hi,

 

Did you use your ZIP code to generate the Zone_Locator.txt file? You cannot use the stock Zone_Locator.txt.

 

The size limit of 150 pounds is imposed by FedEx. They simply do not ship more than 150 lbs for a single package. For those, you might have to use Freight services.

 

Yes, I used our zipcode to generate that crazy pdf, and copied and pasted it into the Zone_Locator.txt text file.

Share this post


Link to post
Share on other sites

Just for fun, here is what i have. Does this look reasonably correct?

000-003 NA

004-005 2

010-034 2

035 3

036 2

037 3

038-039 2

040-045 3

046-047 4

048-050 3

051-053 2

054 3

055 2

056-059 3

060-128 2

129-139 3

140-143 4

144-146 3

147 4

148-149 3

150-157 4

158 3

159-165 4

166-179 3

180-194 2

195-214 3

215 4

216-225 3

226-253 4

254 3

255-286 4

287-294 5

295 4

296 5

297 4

298-323 5

324-325 6

326-329 5

330-342 6

343 NA

344 5

345 NA

346 6

347 5

348 NA

349 6

350-363 5

364-366 6

367-368 5

369 6

370-374 5

375 6

376 4

377-379 5

380-381 6

382-385 5

386-387 6

388 5

389-396 6

397-410 5

411-412 4

413-414 5

415-416 4

417-427 5

428-429 NA

430-449 4

450-452 5

453-458 4

459-479 5

480-487 4

488-491 5

492 4

493-499 5

500-505 6

506-507 5

508-516 6

517-519 NA

520-524 5

525 6

526-539 5

540 6

541-549 5

550-558 6

559 5

560-576 6

577 7

578-579 NA

580-584 6

585-588 7

589 NA

590-591 8

592-593 7

594-599 8

600-634 5

635 6

636-639 5

640-676 6

677-679 7

680-689 6

690-693 7

694-699 NA

700-732 6

733 7

734 6

735-736 7

737 6

738-739 7

740-749 6

750-754 7

755-757 6

758 7

759 6

760-775 7

776-777 6

778-797 7

798-799 8

800-812 7

813-815 8

816-820 7

821 8

822-828 7

829-874 8

875-877 7

878-880 8

881 7

882-883 8

884 7

885-966 8

970-994 8

Share this post


Link to post
Share on other sites
Hi,

 

Could you go to your catalog/includes/modules/shipping folder and list all the files in that folder?

To everyone else,

 

I have been battling with this and just cannot find out the problem. Here are the files in that dir:

flat.php

freeshipper.php

item.phph

percent.php

pickup.php

table.php

ups.php

usps.php

zones.php

Share this post


Link to post
Share on other sites
Just for fun, here is what i have. Does this look reasonably correct?

 

1 more question: What is the zip code that you are shipping to? I don't think that is the problem but your number stops at 970-994...it missed out the following numbers (this is from my zones file):

 

006-007 * 10

008 NA NA

009 * 10

96700 12 9

96701 10 9

96702-96705 12 9

96706-96707 10 9

96708 12 9

96709 10 9

96710 12 9

96711-96712 10 9

96713-96716 12 9

96717 10 9

96718-96729 12 9

96730-96731 10 9

96732-96733 12 9

96734 10 9

96735-96743 12 9

96744 10 9

96745-96757 12 9

96758-96759 10 9

96760-96761 12 9

96762 10 9

96763-96774 12 9

96775 10 9

96776-96781 12 9

96782 10 9

96783-96785 12 9

96786 10 9

96787-96788 12 9

96789 10 9

96790 12 9

96791-96792 10 9

96793 12 9

96794-96795 10 9

96796 12 9

96797 10 9

96798-96800 12 9

96801-96863 10 9

96864-96899 12 9

969 NA NA

99500 11 17

99501-99524 9 17

99525-99539 11 17

99540 9 17

99541-99566 11 17

99567 9 17

99568-99576 11 17

99577 9 17

99578-99999 11 17


- The Jackal

Share this post


Link to post
Share on other sites
I have been battling with this and just cannot find out the problem. Here are the files in that dir:

flat.php

freeshipper.php

item.phph

percent.php

pickup.php

table.php

ups.php

usps.php

zones.php

 

How come fedexzipzones.php is not in the folder? Just for troubleshooting...try removing all the files from the folder except fedexzipzones.php. (Copy and paste them elsewhere for a while) Then test the fedex contribution again. See if the problem persists. If it is solved, then one of these files you listed redeclared the fexexzipzones class.


- The Jackal

Share this post


Link to post
Share on other sites

I made some progress.

 

I started stepping through the code a little more intensively and soon came to realize that the shipping weight the class was getting was way off. A little more investigation and I soon noticed that under the oscommerce configuration, the "Enter the Maximum Package Weight you will ship" was set to 20 or something really low. Somehow that was making the shipping weight reduced. Something along those lines at least. The important thing is for packages under 150 pounds it seems to be working now.

 

However, this leads me to another question for you: If I have this shipping module set to "Bundle Packages = false" and my max weight being 150, and I had 2 products in my cart weighing 125 pounds and 145 pounds, does this contribution calculate in any way shipping costs for each product and return a total?

 

From the looks of it no, but it could be that I may have missed a setting somewhere.

 

Thanks!

Share this post


Link to post
Share on other sites
How come fedexzipzones.php is not in the folder? Just for troubleshooting...try removing all the files from the folder except fedexzipzones.php. (Copy and paste them elsewhere for a while) Then test the fedex contribution again. See if the problem persists. If it is solved, then one of these files you listed redeclared the fexexzipzones class.

 

It's not there because I removed it since it was creating that error. My store is live, so I had to remove it so my customers could access the site.

 

So you're saying I can look for a redeclaration in another file? If I remove all the files, will that break my live store?

 

I truly appreciate your help

Share this post


Link to post
Share on other sites
1 more question: What is the zip code that you are shipping to? I don't think that is the problem but your number stops at 970-994...it missed out the following numbers (this is from my zones file):

 

006-007 * 10

008 NA NA

009 * 10

96700 12 9

96701 10 9

96702-96705 12 9

96706-96707 10 9

96708 12 9

96709 10 9

96710 12 9

96711-96712 10 9

96713-96716 12 9

96717 10 9

96718-96729 12 9

96730-96731 10 9

96732-96733 12 9

96734 10 9

96735-96743 12 9

96744 10 9

96745-96757 12 9

96758-96759 10 9

96760-96761 12 9

96762 10 9

96763-96774 12 9

96775 10 9

96776-96781 12 9

96782 10 9

96783-96785 12 9

96786 10 9

96787-96788 12 9

96789 10 9

96790 12 9

96791-96792 10 9

96793 12 9

96794-96795 10 9

96796 12 9

96797 10 9

96798-96800 12 9

96801-96863 10 9

96864-96899 12 9

969 NA NA

99500 11 17

99501-99524 9 17

99525-99539 11 17

99540 9 17

99541-99566 11 17

99567 9 17

99568-99576 11 17

99577 9 17

99578-99999 11 17

 

I was shipping to zip code 06013 from 06478. I wonder if I am missing some.... will revisit that as well :thumbsup:

Share this post


Link to post
Share on other sites
It's not there because I removed it since it was creating that error. My store is live, so I had to remove it so my customers could access the site.

 

So you're saying I can look for a redeclaration in another file? If I remove all the files, will that break my live store?

 

I truly appreciate your help

 

I did a global search for anything fedex related. There is nothing anywhere. I haven't ever had FedEx installed, but I searched in case any file had it. Nothing.

Edited by tigerlady1

Share this post


Link to post
Share on other sites

I love this mod. Would it be easy to 1) modify this to use Canada zip codes as zone 51 and 54 are in the ground file from FedEx and 2) show the weight that the FedEx charge is based on as: Federal Express (2 Day 3 lbs)?

 

Thanks!

Edited by rpertiet

Share this post


Link to post
Share on other sites
So you're saying I can look for a redeclaration in another file? If I remove all the files, will that break my live store?

 

It would not break your store, but I would highly recommend that you set up a test site instead of testing on your live store.

 

Yes, from the error you mentioned, I am quite sure it's because the class is redeclared twice. So either a file is copied wrongly (check for all occurrences of the class) or there is two files declared with the same class declaration. If I were you, I would recopy all the files from the zip folder again.


- The Jackal

Share this post


Link to post
Share on other sites
Would it be easy to 1) modify this to use Canada zip codes as zone 51 and 54 are in the ground file from FedEx.

 

Thanks!

 

This is intended for USA only as Canada zip code contains Alphabet.

 

and 2) show the weight that the FedEx charge is based on as: Federal Express (2 Day 3 lbs)?

 

Yes, I think it is very possible and should be easy to put weight in. However, I am extremely busy right now, and I have still yet to reply to some pms. :( But I will definitely put this as an enhancement for the next version. (when I get to it) :)


- The Jackal

Share this post


Link to post
Share on other sites

I have just uploaded the 2006 FedEx rates to contributions. There has been an across the board rate increase of about 5-10%. So please update your rates tables.

 

For existing users, just copy buildfedexdata.php and the new 2006 csv to the appropriate folders and run buildfedexdata.php.

 

Please take note that the fuel surcharges have also been changed to 12.5% and 3.5% for Express and Ground respectively from March 2006.


- The Jackal

Share this post


Link to post
Share on other sites

I am getting an error and am hoping someone can help me or point me in the right direction. I installed and ran the buildfedexdata.php and got an error. So i reinstalled using all supplied files to see if I could narrow the problem and I still got the same error. Could someone help me out?

 

The error is:

 

......alot of adding new zones above.....

 

Adding new zone name2: 17

Importing weight/zone rate file fedex_local/2006_FedEx_RatesBySvc_2Day.csv

Adding new Ship Type name: 2nd Day

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

SELECT * FROM fedex_zones WHERE zone_name=

[TEP STOP]

 

 

Thank you very much

 

Todd

Share this post


Link to post
Share on other sites

in the buildfedexdata.php

 

find:

$sql = "SELECT * FROM fedex_zones WHERE zone_name=$zonename";

 

needs to be:

$sql = "SELECT * FROM fedex_zones WHERE zone_name='$zonename'";

 

it is missing the apostrophes.

Share this post


Link to post
Share on other sites
I just installed this and I have an error:

Fatal Error: cannot redeclare class fedexzipzones...

catalog/includes/modules/shipping on line 16

 

can anyone help me with this?

 

Thanks so much

 

I had the same error message, reload the whole thing again and worked.

Share this post


Link to post
Share on other sites

Step 5: Populate the local FedEx Rates database

 

1. Run the following file to build the database with the FedEx zones:

/admin/buildfedexdata.php

 

The output result may be very long. Verify no errors were in the file.

 

Using phpMyAdmin or any database tools, check that the database table "fedex_pcode_to_zone_xref" matches Zone_Locator.txt. Don't worry if the zone_id doesn't seemed to match. The zone_id has gone through a 'translation' in "fedex_zones" table. Just make sure that they are consistent.

 

Many times, FedEx rates are not correct because of human input errors in Zone_Locator.txt. If you have incorrect rates, you should check Zone_Locator.txt first. To correct an error, just modify Zone_Locator.txt and run buildfedexdata.php again. You can run buildfedexdata.php as many times as you want.

 

 

 

 

My question :

 

before step5 ..do .i first create the databases and tables ...plz help me

if yes ,, tell me how step by step ..

 

Thanks

Share this post


Link to post
Share on other sites
Step 5: Populate the local FedEx Rates database

 

1. Run the following file to build the database with the FedEx zones:

/admin/buildfedexdata.php

 

...

before step5 ..do .i first create the databases and tables ...plz help me

if yes ,, tell me how step by step ..

 

Thanks

 

No, you don't need to create the databases. It shall be created for you automatically when you run it. Just ensure all your data files are correct.


- The Jackal

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×