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.
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.
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).
Add to /includes/templates/your_template/templates/tpl_product_info_display.phpAdd to your stylesheet.cssPHP 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 print_stylesheet.cssCode:#printMsgScreen {text-align: whatever; color: #778899;} #printMsgPaper {display: none;}Adjust styling for your particular page layout.Code:#printMsgScreen {display: none;} #printMsgPaper {text-align: whatever; color: #778899; }