Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Posts
    31
    Plugin Contributions
    0

    Default static text and print on every product

    Can someone post an example of how to put a "print" button and the text " Printed by ... " on every product.
    I've looked at everything a cant figure it out. Please help with sample code.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: static text and print on every product

    There is no need for a "print" button on your page, if you use the standard print_stylesheet.css that is in Zen Cart by default. It will cause the browser's file > print function to print a cleaned-up version of the page content. You can tailor this to your liking, and even add a line to the tpl_product_info_display.php file for "Printed by <whatever you want>" that will be hidden on the screen but appear on the printout.

    If you feel you need to encourage customers to print the product page, you can include a message to the effect that it will print neatly with their browser's print function (then hide that message for the paper copy).

  3. #3
    Join Date
    Dec 2010
    Posts
    31
    Plugin Contributions
    0

    Default Re: static text and print on every product

    Quote Originally Posted by gjh42 View Post
    You can tailor this to your liking, and even add a line to the tpl_product_info_display.php file for "Printed by <whatever you want>" that will be hidden on the screen but appear on the printout.
    That sounds great, can you please let me know what code to use.
    I would greatly appreciate it.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: static text and print on every product

    Add to /includes/templates/your_template/templates/tpl_product_info_display.php
    PHP Code:
    <div id=printMsgScreen">This page will print neatly with your browser's Print function</div>
    <div id=printMsgPaper">Printed by <?php echo (whatever specific info you want);?></div>
    Add to your stylesheet.css
    Code:
    #printMsgScreen {text-align: whatever; color: #778899;}
    
    #printMsgPaper {display: none;}
    Add to your print_stylesheet.css
    Code:
    #printMsgScreen {display: none;}
    
    #printMsgPaper {text-align: whatever; color: #778899; }
    Adjust styling for your particular page layout.

 

 

Similar Threads

  1. Adding static text on every product page
    By MaDd0g in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 15 Jul 2010, 12:54 PM
  2. Invoice and Order Print Text Size Issue
    By internetoutfitter in forum General Questions
    Replies: 3
    Last Post: 19 Jun 2010, 09:42 PM
  3. How to create Print icon / "Print htis page" for every product?
    By adi2009 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 4 Mar 2010, 06:49 PM
  4. Adding the same line of text to every product in a category.
    By YZ250 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 10 Mar 2009, 07:29 AM
  5. Replies: 5
    Last Post: 4 Sep 2008, 04:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg