Jump to content

Loading custom.js script in Prestashop 1.7


patrmich

Recommended Posts

Hi,


I am trying to build a test shop with Prestashop 1.7.2.4.

I would like to have some javascript execution when a product long description is displayed.


I added the necessary code in the product long description.
I also put the function code in themes/my-theme/assets/js/custom.js

But, when, I am on the front page product, the javascript code is not executed.


But, in the Chrome console, if I check the function, I can see that it works.
So, it seems that the custom.js file is loaded too late to allow its execution before the display of the product long description.
Would anyone know how to load earlier the custom.js file ?

 

I thank you in advance for any reply.
 

Patrick
 

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