Jump to content

Change address during checkout : Technical error


Recommended Posts

Hi,

PS 1.5.2, Default theme.

If user has more than 1 address saved and choose alternate address for delivery address during checkout, a technical error popup is shown when he clicks on next.

 

Pls see screenshot.

 

post-692-0-45002000-1352989578_thumb.jpg

 

However everything is fine in BO with correct address.

 

Whats the solution as I don't want users to see error boxes!

Link to comment
Share on other sites

Try doing it in Firefox with Firebug, make sure firebug is open, and change the address again, look at the firebug console and you should see an Ajax call was made (the error message is returned from it), if you click the + sign next to it in the console, you should see the actual error.

 

You can also post a link to your site with the front end account, so we could have a look.

Link to comment
Share on other sites

Hi,

Sorry, I am developing on localhost so cannot give access to it.

I tried with Firebug earlier too, it doesn't throw up any errors.

 

However I retried today and noted following:

1) If user changes address and immediately clicks on next, somehow the address update takes longer than the next request. Therefore error crops up. If user waits for a second or two after changing address, and then clicks on Next then everything is fine.

Please see screenshot.

 

You will note that /post/prestashop is still processing and error throws up.

How can we fix this? I saw elsewhere that only option is to slow down site...doesn't sound logical right?

 

post-692-0-10478800-1353046226_thumb.jpg

Link to comment
Share on other sites

Hi,

I tried that. No errors were thrown up except the pop up error box.

 

Like I pointed out, its basically due to the fact that the ajax/js is still running when the next button is pressed. When the processing finishes, the popup goes away and everything proceeds normally.

Link to comment
Share on other sites

You can add your own "fix".

Set a new Javascript variable "is_submit" to false.

When that function is being called, set it to true.

On the callback set it to false again.

Then all that's left is not to trigger the ajax call if "is_submit" is set to true.

 

The other option is to look into aborting the previous call before starting the new one.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...