alwayspaws Posted August 29, 2017 Posted August 29, 2017 Where do I add my dynamic Trust Seal on specific pages, for example to about us and contact, etc pages? Do I put it in the CMS "page content"? I really wanted it on every page but if it will slow down my site, I'll just put it on a few pages. I have the code and it has to go before the ends of the and tags. Please use layman terms and not nerd-speak! lol Thanks! Steph
ssimard Posted August 29, 2017 Posted August 29, 2017 If you want to add stuff in the HEAD setion of your page, you have to do it in the hookDisplayHeader function of your controller. This is also where you would load custom css and Javascript files. You can load a tpl from there and add your code in it. For example, in the socialsharing module, look in the socialsharing_header.tpl of the module in your theme. Oh and of course, you will have to register your module for this hook if it's not already done.
alwayspaws Posted August 29, 2017 Author Posted August 29, 2017 Can this be made easier, please? I use the Transformer theme. Thank you.
MockoB Posted August 30, 2017 Posted August 30, 2017 @alwayspaws wasn't that enough layman for you ? :) I think for the CMS pages when you write them in the back end there is button which shows you the HTML code. Just put the code wherever you need to show the seal. For other pages like product pages for example I believe you should find the matching tpl file and put the code in the body section of that file, again where you need it. I may be wrong so don't count 100% on what I'm telling :)
Guest Posted August 30, 2017 Posted August 30, 2017 If you want to get 'hacky' then you can edit the header.tpl file and put it in there for your theme. TBH I do that for my Google Tag Manager code on PrestaShop. I've edited my comment as there is a custom code section in the Preferences area, this isn't on PrestaShop so it's new to TB. This is where you can try putting in your Trust Seal for the header.
vzex Posted August 30, 2017 Posted August 30, 2017 @alwayspaws This might be a question for Jonny :) Does Transformer have the options for custom css, javascript, tracking and head code? Panda does, I've added code to css without problem but just to change the text color. Might not be what you are looking for since I believe it will change all pages. check: theme editor>custom codes
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 @lesley Do you know if putting the Comodo trust logo will slow down my site if I use it on the whole website?
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 @mockob Nope! I don't understand hooks. :) Your instructions are more understandable to me. :) I'm aware of the CMS pages but @DavidP and @MockoB - do I just add body tags before and after the text/javascript I was given?
wakabayashi Posted August 30, 2017 Posted August 30, 2017 I think you should just try it out. It should not slow down... But I noticed that on my page, the facebook fanpage plugin slows down. So you never know...
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 @wakabayashi said in Where to add html before end of head & body tags for individual pages?: I think you should just try it out. It should not slow down... But I noticed that on my page, the facebook fanpage plugin slows down. So you never know... Thank you. I'm still trying to figure out how to do it. :)
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 @vzex said in Where to add html before end of head & body tags for individual pages?: @alwayspaws This might be a question for Jonny :) Does Transformer have the options for custom css, javascript, tracking and head code? Panda does, I've added code to css without problem but just to change the text color. Might not be what you are looking for since I believe it will change all pages. check: theme editor>custom codes I've already added custom code to the transformer theme courtesy of help from Jonny, so I'm going to ask him again. I really want it on all pages.
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 @wakabayashi yes but don't know if it's okay to post it. If yes, I'll edit this
ssimard Posted August 30, 2017 Posted August 30, 2017 If you want it on all your pages, just go to /themes/yourtheme/header.tpl, edit that file and paste the code you've got at the proper place. This is the general header file, you'll be able to paste it just fine between the head and body tag. Or did I miss something ?
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 At first, I thought I should only have it on specific pages in case it slows down the site. Now I think I should try it on the whole site. You didn't miss anything! :)
ssimard Posted August 30, 2017 Posted August 30, 2017 Well let's try that then, let us know if it works ;-)
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 I'm checking out the template now. Thanks, I will.
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 It says: Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information.
ssimard Posted August 30, 2017 Posted August 30, 2017 Well if you're not using the default theme, it won't get upgraded ;-)
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 My transformer theme is going to get upgraded. I don't know what to do. Add it now and then add it again? :)
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 Sublime indicates there is no tag in the header.tpl file. Should I add it myself? BTW I'm doing this with my test site first and I also backed up the header.tpl file.
ssimard Posted August 30, 2017 Posted August 30, 2017 I did my own theme using the default one as a template, so I don't have this problem ;-) What kind of code is it, Javascript ? It can be added to the custom code section in the back office too.
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 I'll put the code here. Please tell me if I should delete after you see it.
alwayspaws Posted August 30, 2017 Author Posted August 30, 2017 Add this before your tag and Add this before your
Recommended Posts