usagirl Posted December 20, 2011 Share Posted December 20, 2011 I would like to put some tracking snippet in the body of several pages. How can I do it? Please help. Thank you Link to comment Share on other sites More sharing options...
Snade Posted December 20, 2011 Share Posted December 20, 2011 What snippet and in which pages? btw, generelly the tracking goes into the <head> section, not the body Link to comment Share on other sites More sharing options...
usagirl Posted December 20, 2011 Author Share Posted December 20, 2011 Snippet I would like to use must go to body, above the closing /body. For example, I would like to use it on the first page. Is it really matter what snippet and in which pages? Thanks Link to comment Share on other sites More sharing options...
Snade Posted December 20, 2011 Share Posted December 20, 2011 It doesnt really matter what exactly is the snipet, but it does matter where you want to put it. If it has to be on all pages, add it into the footer.tpl Link to comment Share on other sites More sharing options...
usagirl Posted January 7, 2012 Author Share Posted January 7, 2012 Is there anyone who can help to solve this problem? I would like to ad this tracking snippet at least to the first page. Please help. Link to comment Share on other sites More sharing options...
Snade Posted January 7, 2012 Share Posted January 7, 2012 Hi add this code in footer.tpl before the closing </body> tag {if $page_name == 'index'} YOUR TRACKING CODE HERE {/if} This will add the code to the homepage, if you want to tack all pages, just add the code without the {if} Cheers Link to comment Share on other sites More sharing options...
usagirl Posted January 7, 2012 Author Share Posted January 7, 2012 which footer.tpl? There is several of them. where is location of this file? Link to comment Share on other sites More sharing options...
Snade Posted January 7, 2012 Share Posted January 7, 2012 The footer.tpl in the theme you currently use on the site. There is only one footer.tpl file in every theme folder. /*base*dir*/themes/*your*current*theme*/footer.tpl Link to comment Share on other sites More sharing options...
usagirl Posted January 7, 2012 Author Share Posted January 7, 2012 Here os the code of footer. I don't see even begining of code <body> or <html> {if !$content_only} </div> <!-- Right --> <div id="right_column" class="column">{$HOOK_RIGHT_COLUMN}</div> <div class="clearblock"></div> </div> <!-- Footer --> <div id="footer_wrapper"> <div id="footer"> {$HOOK_FOOTER} <!-- [[%FOOTER_LINK]] --> </div> </div> </div> </div> </div> {/if} </body> </html> Link to comment Share on other sites More sharing options...
Snade Posted January 8, 2012 Share Posted January 8, 2012 Hi, as I thought, you need to learn few things about prestashop and smarty. In this perticular case, you need to know that the "main" html structure of the preastashop template, consist out of 2 files -header.tpl and footer.tpl . All the hooks are basically placed in these files, and the <body> tag is opened in the header.tpl and closed in the footer.tpl, as you can see: </div></div> </body> </html> To achive what you want, just do what I told you, place this code in footer.tpl before the closing </body> tag {if $page_name == 'index'} *YOUR TRACKING CODE HERE* {/if} I believe that this topic is now [sOLVED]. If you have any questions, feel free to PM me. I'll be happy if you "like" my post, if it was helpfull to you. Thanks ! Link to comment Share on other sites More sharing options...
usagirl Posted January 8, 2012 Author Share Posted January 8, 2012 Thank you for you reply. I did what you said, but it still does now work. I paste it without if statemnt. {if !$content_only} </div> <!-- Right --> <div id="right_column" class="column">{$HOOK_RIGHT_COLUMN}</div> <div class="clearblock"></div> </div> <!-- Footer --> <div id="footer_wrapper"> <div id="footer"> {$HOOK_FOOTER} <!-- [[%FOOTER_LINK]] --> </div> </div> </div> </div> </div> {/if} </body> </html> I don't see it in source code either. Link to comment Share on other sites More sharing options...
usagirl Posted January 8, 2012 Author Share Posted January 8, 2012 here is the directory to file where I put this code: Link to comment Share on other sites More sharing options...
Snade Posted January 8, 2012 Share Posted January 8, 2012 Hi, it seems like you have another thing to learn about presta When you make changes to the tpl files, you need to recompile them, so the changes take effect. Just make sure that the theme you currently use is in the folder /theme205/, and then turn force compile to on, to recompile the .tpl files.(Preferences->Performance) After you do that, please post a link, so I can check if the code is there. 1 Link to comment Share on other sites More sharing options...
usagirl Posted January 8, 2012 Author Share Posted January 8, 2012 It worked, thank you. Problem solved. Link to comment Share on other sites More sharing options...
usagirl Posted January 8, 2012 Author Share Posted January 8, 2012 Dear Snade, How to create RSS Block. It is in the modules, but I don't know what to put in the "Add a feed URL" text box. Please help Link to comment Share on other sites More sharing options...
Snade Posted January 11, 2012 Share Posted January 11, 2012 Hi You also need to instal the module "RSS products feed", and get that url from it. Let me know if this solves it for you. If it does, dont forget to add [solved] in the topic name, and I'll be happy if you "like" my comments, if they were helpfull to you. Thanks ! 1 Link to comment Share on other sites More sharing options...
usagirl Posted January 14, 2012 Author Share Posted January 14, 2012 I got my link http://www.alver.com/modules/feeder/rss.php and tried to paste it in the RSS feed block "Add a feed URL" , but it says: You have selected a feed URL on your own website. Please choose another URL I got lost. Link to comment Share on other sites More sharing options...
Snade Posted January 14, 2012 Share Posted January 14, 2012 Dont know why I thought that RSS Block will create a block for subscribeing to your feed, when actually this block displays rss feed, and obviously cant display feed from your site. My mistake What you actually wanna do, display some other feed or just add button for subscribing to your product rss feed ? I think its not the first, because if it was, you was going to configure the module right away. So if you wanna make the rss button for subscribing, then just find some nicelooking rss icon, put it somewhere in your design and add your product rss feed url as a link to it. (p.s just in case you wanna display your feed on your site - you dont need that, use new products block ) Link to comment Share on other sites More sharing options...
usagirl Posted January 14, 2012 Author Share Posted January 14, 2012 ok. thank you. Can you please check your email? Link to comment Share on other sites More sharing options...
Recommended Posts