Greu Posted February 16, 2013 Share Posted February 16, 2013 Greatings In the front office, a "print button" allows customers to print each product page. Does anyone know how to desactivate this function and hide the print button ? Feel welcome. Link to comment Share on other sites More sharing options...
PascalVG Posted February 16, 2013 Share Posted February 16, 2013 Hi Greu, Print Button (or link) is found in /Themes/<your themes folder>/product.tpl In version 1.5.3.1 you find this line (other version probably similar, search for "Print") <li class="print"><a href="javascript:print();">{l s='Print'}</a></li> Edit this line, comment it out, redirect to 'Sorry no printing allowed" page. Up to you Hope this helped, Pascal 1 Link to comment Share on other sites More sharing options...
Greu Posted February 16, 2013 Author Share Posted February 16, 2013 Hi Pascal, Thanks for your guidance ! Sure, it helps ! If I have correctly understood your solution, erasing this line from the script will make the button inactive. Or did you mean that I only need to change one parameter in this line and leave the line ? In this case, which one ? Into which value ? Will the button also disappear or is it necessary to change another script for that result ? Now, I'm thinking that maybe would it be simpler to only erase the button and leave the printing function intact ? Printing might be needed somewhere else in the shop, and I only want to not incitate customers to print product pages. I will need to wait your answer before action. Thanks. Link to comment Share on other sites More sharing options...
PascalVG Posted February 16, 2013 Share Posted February 16, 2013 Hmm, in my 1.5.3.1 default theme there's only a link, no button or so. Can you provide me a link to your shop? I expect you can just erase this line from the file. The function stays still intact, this here is only a call of this function so that the user can start the print process. By taking it out, you just prevent them to print :-) 1 Link to comment Share on other sites More sharing options...
Greu Posted February 16, 2013 Author Share Posted February 16, 2013 Can you provide me a link to your shop? I'm sorry Pascal, it is not online yet (did you mean that ?). I expect you can just erase this line from the file. The function stays still intact, this here is only a call of this function so that the user can start the print process. By taking it out, you just prevent them to print :-) YESSSS !! Is there a symbol in the script language that, if added at the beginning of a line, will turn it from instruction into comment ? In case we need to go back later. Link to comment Share on other sites More sharing options...
PascalVG Posted February 17, 2013 Share Posted February 17, 2013 (edited) Comments: Sure there is: Single lines, or from 'this point on the line till the end of the line', use: // everything behind these slashes is ignored For Block of code you can use /* The code I don't want to use And this line neither */ See also http://www.w3schools.com/php/php_syntax.asp Cheers, Pascal Edited February 17, 2013 by PascalVG (see edit history) 1 Link to comment Share on other sites More sharing options...
Greu Posted February 17, 2013 Author Share Posted February 17, 2013 Great ! Many thanks for all Pascal. 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