Jump to content
ingenium13

scrollTo js not working in Chrome with default-bootstrap in 1.6.1.18, but works in Firefox

Recommended Posts

I recently upgraded my Prestashop installation to 1.6.1.18. I noticed that when a customer views their order history and selects an order to view the details, the details load at the bottom of the page, but it doesn't scroll to them. I switched to the default theme (default-bootstrap), and the problem is still there. It seems that the javascript function "scrollTo" is not working in Chrome 64 for Desktop or Android (or else it isn't getting called). It likely affects older versions of Chrome as well.

When I tried it in Firefox however, it works. It doesn't scroll right away, it takes 2-5 seconds, but it does scroll.

Is this a known bug? Why does it work in Firefox but not Chrome? Is there any way to fix this? Nothing shows up in the Chrome developer console to indicate what the problem may be.

Edited by ingenium13
add tags (see edit history)

Share this post


Link to post
Share on other sites

We are also facing the same problem with prestashop 1.6.1.7.

Does anybody solved this?

Share this post


Link to post
Share on other sites

Maybe a bit late, but this quick'n'dirty solution posted today by German user rictools works with all 1.5 and 1.6 releases. Open history.tpl in your theme directory and modify in both places (order reference and details link)

 <a class="color-myaccount" href="javascript:showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('order-detail', true, NULL, "id_order={$order.id_order|intval}")|escape:'html':'UTF-8'}');">

by adding scrollTo(0,600); or scrollTo(0,300); (faster)

to

<a class="color-myaccount" href="javascript:showOrder(1, {$order.id_order|intval}, '{$link->getPageLink('order-detail', true, NULL, "id_order={$order.id_order|intval}")|escape:'html':'UTF-8'}');scrollTo(0,600);">

It's the easiest way to fix this annoying error that only occurs in browsers Opera and Chrome.

Share this post


Link to post
Share on other sites

I'm also facing the same problem with prestashop 1.6.1.4.

Unfortunately, Eleazar's solution didn't work to me.

 

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

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More