Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FedEx calling quote() 2x - getting quotes list twice


benbogart

Recommended Posts

Has anyone had this problem?

 

For some reason OSC is calling the quote() function in the FedEx shipping module (v. 2.07) twice, resulting in duplicates of each shipping method. In checkout it looks like this:

 

 	
Federal Express (Total items: 2 pcs. Total weight: 0.82 lbs) Federal Express 	

Home Delivery (2 days) 	$8.23 		
Express Saver (3 Day) 	$10.60 		
Home Delivery (2 days) 	$8.23 		
Express Saver (3 Day) 	$10.60

 

With debug on I added some output to the beginning and end of the quote() function to see why this was happening and sure enough it pumped out the debug info twice, once before outputting progress bar and once after. Does anyone have any idea why the quote function would be called 2x. Maybe something leftover from a previous module that wasn't completely removed... but what?

 

Thanks for your help. I'm still pretty new to osc.

Edited by benbogart
Link to comment
Share on other sites

Does anyone have any idea why the quote function would be called 2x.

Actually, the shipping modules are loaded and the function quote called twice: once when the page is opened and then when the customer makes a choice and submits. But never twice when the page get opened to get the rates doubled. That is bizar.

Link to comment
Share on other sites

Actually, the shipping modules are loaded and the function quote called twice: once when the page is opened and then when the customer makes a choice and submits. But never twice when the page get opened to get the rates doubled. That is bizar.

 

... and it only happens with the fedex module. The others are fine.

 

Ben

Link to comment
Share on other sites

ok, thats not the problem. I added the same code to the ups module to see if it had quote called 2x and it did just like the fedex module, once before and once after the status bar. The difference is that the UPS doesn't duplicate the shipping methods. Anyone know why? Thanks...

Link to comment
Share on other sites

ok, thats not the problem. I added the same code to the ups module to see if it had quote called 2x and it did just like the fedex module, once before and once after the status bar. The difference is that the UPS doesn't duplicate the shipping methods. Anyone know why? Thanks...

 

Fedex 2.07 has two tracks of calculation... one is for normal items processed per the stores configuration, and another path that is followed if your designate an item "ship seperate"... perhaps you are seeing both paths for some bizarre reason. But that still doesnt explain the symptoms you describe.. that is strange

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

Well, I sort of gave up... I noticed that for some reason the rates were not duplicated in the MVS version of the FedEx module (but the quote function is still called twice and the data is sent to FedEx twice). I had also noticed some other strange behavior with the regular shipping like the change address box being duplicated with some shipping modules enables which also was not happening using mvs on and using the mvs versions of the modules. So I modified my one custom shipping module for MVS (not so hard actually now that I have an idea whats going in) and everything seems to be working fine -- at least on the surface.

 

I still have burning curiosity to find out what was going on, and I will have to resolve problem of the data being sent twice to FedEx at some point, but I have to get this site released as soon as possible so I'll have to wait until I have a little free time to track it down. Oh well.

 

Thanks for the replies.

Ben

Link to comment
Share on other sites

  • 3 months later...

I'm having the same issue. I have quite a few items with "ship seperately" checked and it definitely does it with them. I'll have to do some testing for non-ship seperately items, but if anyone has a solution, please post!

Link to comment
Share on other sites

  • 1 month later...

Hi All,

I was having this problem, and in my case the culprit was in the file:

catalog/checkout_shipping.php.

 

This line appeared twice in my page, once near the top and then again in the body:

$quotes = $shipping_modules->quote();

 

I had this line added into the body due to the Multiple Vendor Shipping (MVS) module that I installed some time ago. I removed the entry at the top, because the one in the body was part of MVS and it fixed the issue.

 

So, check for the line, $quotes = $shipping_modules->quote(); and make sure it only appears once.

 

Good luck!

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