magento print friendly page for products

2019-09-01 19:29发布

问题:

In magento, is there already a way to do for a friendly print pages?

Just before I write my own block to do this, I wasn't sure if there was an default / existing one I can edit.... :)

Cheers

Shane

回答1:

Actually, I think I may be able to do this through a print css... Going to give it a go!

Yep used the defualt print.css - but changed it to look how I wanted, job done!



回答2:

Not as far as I know, although there is a print.css.

There are a few ways I can think of to go about it, and none of them are built-in

1) Make your own site-specific print.css (good)
2) Make your own button to display / hide elements with JS (ugly)
3) Write your own Magento code to generate a printable page (difficult)
4) Get an extension -there are several PDF generators out there, and also a newer extension called CleanPrint that doesn't use PDF's



回答3:

Printing my magento pages were coming out as links/text, no images. I did go to skin>frontend>"theme">default>css>"print.css" and found that if I commented out everything after "@media print {" all the way to the closing bracket "}", it printed everything perfectly. I'll add the code that I'm using now without the commented out code below.

/* ======================================================================================= */

/* Boilerplate Print CSS  ========================START=========================== */

/*
* Media queries for responsive design
* These follow after primary styles so they will successfully override.
*/

@media all and (orientation:portrait) {
 /* Style adjustments for portrait mode goes here */

}

@media all and (orientation:landscape) {
  /* Style adjustments for landscape mode goes here */

}

/* Grade-A Mobile Browsers (Opera Mobile, iPhone Safari, Android Chrome)
  Consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ */
@media screen and (max-device-width: 480px) {

  /* Uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you
     j.mp/textsizeadjust
  html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
}

/*
 * print styles
 * inlined to avoid required HTTP connection www.phpied.com/delay-loading-your-print-css/
 */

/* Boilerplate Print CSS =========================END============================ */

Hope this helps…



回答4:

I don't think there is any default way for printer friendly products in Magento. You need to write your own code to do so.

This link might help:-

http://ajmaltash.wordpress.com/2010/05/23/print-link-on-product-detail-page-magento-1-4-0-1/ [ LINK NOT WORKING ]

Update:

Here is a FREE Magento Extension to Print Product & Shopping Cart Page