Jump to content

Inject script on cms page Prestashop 1.7


colives

Recommended Posts

Hello everybody!

 

I would love to use a PHP calculator called "Zigaform" on Prestahop 1.7. I used this tool before on 1.6 without any problem, I had only to include script on /root/themes/mytheme/cms.tpl specifying in which cms id I like to run it and then, calling it from my cms page. Really simple.

 

Somethig like that:

 

on cms.tpl file

 

 
{if $cms->id==20}
{literal}
<script type="text/javascript"> var UIFORM_WWW = "https://xxxxxx.com/xxxxxx/index.php/""; var UIFORM_SRC = "https://xxxxxx.com/xxxxxx/i"; var _uifmvar = _uifmvar || {}; _uifmvar.fm_ids = _uifmvar.fm_ids || []; _uifmvar.fm_ids.push(['11']); (function(){var uiform = document.createElement('script'); uiform.type = 'text/javascript'; uiform.async = true; uiform.src = ('https:' == document.location.protocol ? UIFORM_SRC : UIFORM_SRC) + 'assets/frontend/js/init.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uiform, s);})();</script>
{/literal}
{/if}
 

 

and on cms page (id=20)

 

<div id="uifm_container_11" class="uiform-wrap">

 

 

Now, in 1.7 file structure has changed and I don't know which .tpl file is the one I have to use to include my script.

 

Could you please help me to make it run in PS 1.7?

 

Many thanks!!

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