magento 打印友好的产品页面

发布于 2024-11-04 13:00:04 字数 116 浏览 1 评论 0原文

在magento中,是否已经有一种方法可以实现友好的打印页面?

就在我编写自己的块来执行此操作之前,我不确定是否有可以编辑的默认/现有块......:)

干杯

Shane

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

○闲身 2024-11-11 13:00:04

实际上,我想我可以通过打印CSS来做到这一点......去尝试一下!

是的,使用了默认的 print.css - 但将其更改为我想要的样子,工作完成!

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!

半边脸i 2024-11-11 13:00:04

据我所知,虽然有 print.css,但还没有。

我可以想到几种方法来解决这个问题,但它们都不是内置的

1)制作您自己的站点特定的 print.css(好)
2)用JS制作自己的按钮来显示/隐藏元素(丑陋)
3)编写自己的Magento代码来生成可打印的页面(困难)
4) 获取一个扩展 - 有几个 PDF 生成器,还有一个名为 CleanPrint 的较新扩展,它不使用 PDF

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

寻找一个思念的角度 2024-11-11 13:00:04

打印我的 magento 页面以链接/文本形式出现,没有图像。我确实去了 Skin>frontend>"theme">default>css>"print.css" 并发现如果我注释掉“@media print {”之后的所有内容一直到右括号“}”,它会打印一切都很完美。我将添加我现在使用的代码,而不使用下面注释掉的代码。

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

/* 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============================ */

希望这有帮助……

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…

冷心人i 2024-11-11 13:00:04

我认为 Magento 中没有任何默认的打印机友好产品方式。您需要编写自己的代码才能执行此操作。

此链接可能会有所帮助:-

http://ajmaltash.wordpress.com/2010/05/23/print-link-on-product-detail-page-magento-1-4-0-1/ [链接不起作用]

更新:

这是免费的 Magento 扩展打印产品购物车页面

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文