[英]How do I place a thumbnail of items in a product package on the cart page?
I'm trying to place the thumbnail of items of product package on the cart page. 我试图将产品包装项目的缩略图放在购物车页面上。 I tried this code: 我尝试了这段代码:
<img class="thumbnail"
src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->constrainOnly(true)->resize(80, 80); ?>"
alt="<?php echo $this->escapeHtml($this->getImageLabel()) ?>"
title="<?php echo $this->escapeHtml($this->getImageLabel()); ?>" />
In this archive: app/design/frontend/default/my-theme/template/checkout/cart/item/default.phtml 在此档案中: app / design / frontend / default / my-theme / template / checkout / cart / item / default.phtml
Screenshot of cart page 购物车页面的屏幕截图
And this shows only default thumbnail image. 并且这仅显示默认的缩略图图像。
What code can I use to solve this? 我可以使用什么代码来解决这个问题?
My magento version: 1.9.2.2 我的magento版本:1.9.2.2
Please try $this->getProductThumbnail(), I think this should be works. 请尝试$ this-> getProductThumbnail(),我认为这应该可行。 Thanks. 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.