Jump to content

Print Button


Greu

Recommended Posts

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

  • Like 1
Link to comment
Share on other sites

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

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 :-)

 

  • Like 1
Link to comment
Share on other sites

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

 

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 by PascalVG (see edit history)
  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...