Jump to content

Integrate wordpress into prestashop, variable js_def


restaller

Recommended Posts

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

  • 3 weeks later...

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