Nandos Posted July 25, 2016 Share Posted July 25, 2016 (edited) Hi guys. Recently i added a custom code to the footer to show some logos for our store, to inform the customers about the fact we are on some serch engines, security stuff and so on. It looked good so far, and it is, but i figured out that those logos also appear in the popup preview window of the products. Indeed now i don't want to show them there too, only on the normal footer, not in the preview popup. Any guess? Screenshot to clarify what i want to remove: http://imgur.com/a/KFOvM The goal, at this point, is to remove completely the footer from the preview, if possible. If not, at least to remove the custom part from the preview. Thanks in advance. Edited July 26, 2016 by Nandos (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted July 26, 2016 Share Posted July 26, 2016 Try overriding the module's TPL file in your theme, then adding the following to the top: {if !$content_only} and the following at the bottom: {/if} This should hide the code when it's viewed in "Quick view". 1 Link to comment Share on other sites More sharing options...
Nandos Posted July 26, 2016 Author Share Posted July 26, 2016 (edited) Try overriding the module's TPL file in your theme, then adding the following to the top: {if !$content_only} and the following at the bottom: {/if} This should hide the code when it's viewed in "Quick view". Thank you, in what file exactly i should do this edit? And also, explain me what you mean for override. I've to add that code to an existing file or i have to create another file? If so, with what code and where? Sorry, i'm still learning, not an expert . Edited July 26, 2016 by Nandos (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted July 26, 2016 Share Posted July 26, 2016 I can't say exactly which file, since I don't know the name of your custom module that adds those logos. You can go to Modules > Positions and check the "Product footer" hook to see what modules are available, then check the files of that module. 1 Link to comment Share on other sites More sharing options...
Nandos Posted July 26, 2016 Author Share Posted July 26, 2016 I can't say exactly which file, since I don't know the name of your custom module that adds those logos. You can go to Modules > Positions and check the "Product footer" hook to see what modules are available, then check the files of that module. I didn't insert modules into my footer.tpl file, i just wrote a sample code with images, that is the following: <div class="container mobile-hidden"> <div class="center"> <a href="https://www.sitelock.com/" onclick="target='_blank'; window.open('https://www.sitelock.com/verify.php?site=www.100asa.it','SiteLock','width=600,height=600,left=160,top=170'); return false;" onkeypress="target='blank'" ><img src="https://shield.sitelock.com/shield/www.100asa.it" align="middle" alt="SiteLock" title="SiteLock" /></a>  <a href="http://www.shopmania.it/" title="Visita 100asa.it su ShopMania" onclick="target='_blank'; window.open('http://www.shopmania.it/site/100asa.it'); return false;" onkeypress="target='_blank'"><img src="https://www.shopmania.it/img/badge/it/3.png?m=299600619" align="middle" style="border: 0;" alt="Visita 100asa.it su ShopMania" /></a>  <a rel="nofollow" href="http://www.trovaprezzi.it/scheda_negozio-100asa.aspx" title="Presente su TrovaPrezzi" target="_blank"><img src="https://img.trovaprezzi.it/buttons/recommendedby/presente_su_trovaprezzi_160x80_bianco.png" style="border:0px" alt="Presente su TrovaPrezzi"></a> </div> </div> Basically, that's the part i don't want to show into my quick preview. Thanks in advance. Link to comment Share on other sites More sharing options...
rocky Posted July 26, 2016 Share Posted July 26, 2016 Then try adding the if statement in my previous post around that code. 1 Link to comment Share on other sites More sharing options...
Nandos Posted July 26, 2016 Author Share Posted July 26, 2016 Then try adding the if statement in my previous post around that code. You are the man, it works . Can you explain me, code-wise, the funcionality of {if !$content_only}{/if}, what it does and in what other cases can be used? Thanks a lot for helping and patience. Link to comment Share on other sites More sharing options...
rocky Posted July 26, 2016 Share Posted July 26, 2016 When you open quick view or open "Terms and conditions" or other content in a popup, the variable $content_only is set to 1. That if statement checks whether the $content_only variable is 0 and executes the code only if it is. You can use the variable in any TPL file. 1 Link to comment Share on other sites More sharing options...
Nandos Posted July 26, 2016 Author Share Posted July 26, 2016 When you open quick view or open "Terms and conditions" or other content in a popup, the variable $content_only is set to 1. That if statement checks whether the $content_only variable is 0 and executes the code only if it is. You can use the variable in any TPL file. Perfect. I thought something similar, this is the confirmation! 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