peanut Posted April 9, 2014 Share Posted April 9, 2014 Hi I have a Jquery script that I would like to use in a CMS page. How can I do it? It doesn't seem to work if I use it directly. I've done the same on other carts but not able to do so in PS 1.6. Any help please? TIA Link to comment Share on other sites More sharing options...
NemoPS Posted April 9, 2014 Share Posted April 9, 2014 Try this, might work on 1.6 as well http://www.prestashop.com/forums/topic/277221-insert-javascript-on-cms-page/ Link to comment Share on other sites More sharing options...
peanut Posted April 9, 2014 Author Share Posted April 9, 2014 (edited) Try this, might work on 1.6 as well http://www.prestashop.com/forums/topic/277221-insert-javascript-on-cms-page/ thanks! it's sort of working but I'm not able to add the CSS files...I'm not sure how to. Edited April 9, 2014 by peanut (see edit history) Link to comment Share on other sites More sharing options...
peanut Posted April 9, 2014 Author Share Posted April 9, 2014 (edited) I need to add this to the code: <link rel="stylesheet" type="text/css" href="css/dcsns_wall.css" media="all" /> but everytime I save and return to it, it goes missing from the editor and doesn't apply on the CMS page too. What should I do? Edited April 9, 2014 by peanut (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted April 9, 2014 Share Posted April 9, 2014 you have to upload these file somewhere to your hosting account (ftp) then instead of href="css/dcsns_wall.css" use href with direct link to file like href="http://yourwebsite.com/css/dcsns_wall.css" the other thing: paste contents of this file to your CMS contents between <style></style> html tag. effect will be the same, but the code just be attached as a code, not a file Link to comment Share on other sites More sharing options...
peanut Posted April 10, 2014 Author Share Posted April 10, 2014 you have to upload these file somewhere to your hosting account (ftp) then instead of href="css/dcsns_wall.css" use href with direct link to file like href="http://yourwebsite.com/css/dcsns_wall.css" the other thing: paste contents of this file to your CMS contents between <style></style> html tag. effect will be the same, but the code just be attached as a code, not a file tried it but doesn't work. The code is not there after I save the cms page. It's the only piece that isn't working. Link to comment Share on other sites More sharing options...
peanut Posted April 12, 2014 Author Share Posted April 12, 2014 can anyone help me with the CSS please? Link to comment Share on other sites More sharing options...
peanut Posted April 29, 2014 Author Share Posted April 29, 2014 anyone? Link to comment Share on other sites More sharing options...
dioniz Posted April 29, 2014 Share Posted April 29, 2014 You need that link to be visible in css or you will use that css? Link to comment Share on other sites More sharing options...
vekia Posted April 29, 2014 Share Posted April 29, 2014 tried it but doesn't work. The code is not there after I save the cms page. It's the only piece that isn't working. can you show what you've got after save? Link to comment Share on other sites More sharing options...
peanut Posted April 30, 2014 Author Share Posted April 30, 2014 You need that link to be visible in css or you will use that css? I will be using that css can you show what you've got after save? It's here: http://vps4030.inmotionhosting.com/~droppe5/content/7-social-wall As you will see it isn't displaying properly since CSS isn't reflecting. Link to comment Share on other sites More sharing options...
dioniz Posted April 30, 2014 Share Posted April 30, 2014 (edited) Try to add css link to header.tpl just after {if isset($css_files)} Edited April 30, 2014 by dioniz (see edit history) Link to comment Share on other sites More sharing options...
falkor Posted April 30, 2014 Share Posted April 30, 2014 To improve this answer from dioniz you can add{if isset($page_name) && $page_name == "cms"} css link {/if} And remember, you have body classes (for cms page its cms-{page_id} and cms-{page_alias}) use them in your css code to override global selectors. 1 Link to comment Share on other sites More sharing options...
peanut Posted May 2, 2014 Author Share Posted May 2, 2014 Try to add css link to header.tpl just after {if isset($css_files)} To improve this answer from dioniz you can add {if isset($page_name) && $page_name == "cms"} css link {/if} And remember, you have body classes (for cms page its cms-{page_id} and cms-{page_alias}) use them in your css code to override global selectors. I've tried it but still hasn't worked. I don't know what I'm doing wrong. I only want this one cms page to use that particular css in the content. Link to comment Share on other sites More sharing options...
dioniz Posted May 2, 2014 Share Posted May 2, 2014 would be easier if we can see your site. it's in maintenance mode Link to comment Share on other sites More sharing options...
peanut Posted May 14, 2014 Author Share Posted May 14, 2014 would be easier if we can see your site. it's in maintenance mode Hey sorry we were trying to migrate one shop to another, it is up now. Link to comment Share on other sites More sharing options...
kognito Posted July 7, 2014 Share Posted July 7, 2014 Try this, might work on 1.6 as well http://www.prestashop.com/forums/topic/277221-insert-javascript-on-cms-page/ Hi guys, I can't seem to get it to work in v1.6. Have changed the Validate.php as per Vekia's article here, I only end up with an empty <p></p> tag after saving the page... Any help or ideas are very appreciated! Cheers Clemens Link to comment Share on other sites More sharing options...
vekia Posted July 7, 2014 Share Posted July 7, 2014 Hi guys, I can't seem to get it to work in v1.6. Have changed the Validate.php as per Vekia's article here, I only end up with an empty <p></p> tag after saving the page... Any help or ideas are very appreciated! Cheers Clemens what version exactly? 1.6.0.8? if so - check html purifier feature available under preferences > general if it's enabled - disable it this feature crashes a lot of useful html/js/css snippets 1 Link to comment Share on other sites More sharing options...
kognito Posted July 7, 2014 Share Posted July 7, 2014 what version exactly? 1.6.0.8? if so - check html purifier feature available under preferences > general if it's enabled - disable it this feature crashes a lot of useful html/js/css snippets Thanks Vekia, that did the trick! Cheers Clemens Link to comment Share on other sites More sharing options...
Recommended Posts