colives Posted August 22, 2017 Share Posted August 22, 2017 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 More sharing options...
vekia Posted August 22, 2017 Share Posted August 22, 2017 /themes/classic/templates/cms/page.tpl is the file that is responsible for cms page contents Link to comment Share on other sites More sharing options...
colives Posted August 22, 2017 Author Share Posted August 22, 2017 Many thanks!! I'm going to try right now. I was trying to run directly the script on the cms page following this tutorial. https://mypresta.eu/prestashop-17/extend-text-editor-in-new-presta.html Do you think will be better than old solution I did on PS 1.6? Link to comment Share on other sites More sharing options...
colives Posted August 22, 2017 Author Share Posted August 22, 2017 Well.. I answer myself. I include the script directly into the cms page and then, call it on the page and works. 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