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。