0
在magento主题的顶部酒吧上建立一个小型图标。需要在minicart中显示产品缩略图和名称。我在目录“checkout/cart”中创建了一个文件top_cart.phtml。使用下面给出的代码。Magento 1.7缩略图图像不显示
<?php
$_cartQty = $this->getSummaryCount();
$session = Mage::getSingleton('checkout/session');
if ($_cartQty == 0) : ?>
<span class="titleBlock">Your shopping cart is empty.</span>
<?php else :
foreach($session->getQuote()->getAllItems() as $_item): ?>
<div>
<span><?php echo $_item->getThumbnailImage(); ?></span>
<span><?php echo $_item->getName(); ?></span>
</div>
<?php endforeach ?>
<?php endif;?>
?>
现在名称显示正确,但缩略图图像未显示。指南plz。