restaller Posted January 16, 2017 Share Posted January 16, 2017 Hello everyone!, I have integrated Wordpress in prestashop, but I have a single problem. The variable {$ js_def} does not work within this conditional {if (is_callable ('bloginfo'))} This conditional I use it to load .js needed, only in the pages of the blog. But as I say, so the variable does not work well. So I've used this: {if (is_callable ('bloginfo'))} <script type = "text / javascript" src = "{$ js_dir} def.js"> </ script> {foreach from = $ js_files item = js_uri} <script type = "text / javascript" src = "{$ js_uri | escape: 'html': 'UTF-8'}"> </ script> {/ foreach} {/ if} I make a call to the code that I have inserted into a file, but of this form, the cart block fails if I select "Move javascript at the end" in Advanced parameters -> Performance Link to comment Share on other sites More sharing options...
shacker Posted January 21, 2017 Share Posted January 21, 2017 you must add in your php the smarty variable like this 'js_def' => Media::getJsDef(), Link to comment Share on other sites More sharing options...
restaller Posted January 22, 2017 Author Share Posted January 22, 2017 Thanks, but it does not work on blog pages. Link to comment Share on other sites More sharing options...
restaller Posted January 22, 2017 Author Share Posted January 22, 2017 you must add in your php the smarty variable like this 'js_def' => Media::getJsDef(), Thanks, but it does not work on blog pages. Link to comment Share on other sites More sharing options...
shacker Posted February 11, 2017 Share Posted February 11, 2017 do you create a controller or how do you use the blog page? Link to comment Share on other sites More sharing options...
restaller Posted February 15, 2017 Author Share Posted February 15, 2017 do you create a controller or how do you use the blog page? I did not see the message. I have not used any drivers, then I'll put more information, if it's any good 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