cchris-king Posted October 30, 2017 Share Posted October 30, 2017 hello i have posted before about how to use jquery in prestashop 1.7 product pages but i relly didn't get answer i think the community is not so active, anyway i hope i can get help this time, so want to use jquery in my product page for smooth parallax scroll, but i don't know where to write my jquery code, in core.js ? or create my js file then include in product.tpl and how ? i also downloaded jquery3.2.1 in js/jquery/, but really don't know how to use it i have read the asset managements documents on prestashop support but i really don't understand anything they say, Link to comment Share on other sites More sharing options...
Katamariz Posted October 30, 2017 Share Posted October 30, 2017 What you can do is embed it between the <head></head> in layout-both-columns.tpl, which you can find in you themes /templates/layouts folder. Good luck! Link to comment Share on other sites More sharing options...
cchris-king Posted October 30, 2017 Author Share Posted October 30, 2017 1 hour ago, Katamariz said: What you can do is embed it between the <head></head> in layout-both-columns.tpl, which you can find in you themes /templates/layouts folder. Good luck! thanks you so much i did it but i got an error in the navigator chrome and firefox Quote Uncaught SyntaxError: Unexpected token < Link to comment Share on other sites More sharing options...
Stkado Posted October 31, 2017 Share Posted October 31, 2017 try this : on package.json "jquery": "^3.2.1", then npm install jquery if you want add js on product page go to mytheme/_dev/js/product.js then npm run build, this will compile everyting into your asset theme.js Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now