Jump to content

Problem to move javascript code to bottom in prestashop 1.7


caroled01

Recommended Posts

Thank you for your answer.

I have a problem with the module "Mondial Relay". It's a french carrier and it might display relay points when selected, but they are not displayed.

And I read somewhere that if I move the code to the end it may work.

That's why I wanted to try.

But if it doesn't exist anymore I don't know what to do, I'll have to find another solution.

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...
On 11/8/2018 at 7:30 PM, Rolige dice:

Hello,

Doesn't exist because it cause several problems in the past, that's why it was removed, Any particular reason why you need to move it at the end?

Regards!

So Prestashop it's supposed to load all the javascript into the head of the page?
Prestashop demo website seem to be loading the into the footer.

Link to comment
Share on other sites

PS by default moves .js to bottom, I only checked 1.7.6 and up, this is not longer an option.

please provide your front office url so we can check 

also I recommend only using CCC of .js or .css if all pages have same ccc filename, you can check this by view source.  If they are different by page type, i.e. product/index/category you should disable CCC for that file type as this improves performance.

regardless, since 1.6 PS offered option to load .js bottom, in later releases it is no longer an option.

 

Link to comment
Share on other sites

I see that most of the js are loaded into footer, while few on header.
I think there's something wrong with jquery, because I ofter get js error into browser console related to it (for example when trying to add new modules).
But also navigating on the website, for example dragging the product slider on home, or on product page clicking on product image opening the gallery.

Edited by DARKF3D3 (see edit history)
Link to comment
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...