使用产品选项在购物车中显示商品

时间:2012-02-24 07:35:29

标签: magento magento-1.5

有没有人可以指导我在标题栏中显示带有产品及其颜色,大小等选项的项目..,这是我的代码

<?php
$quote=Mage::getSingleton('checkout/session')->getQuote();
$count=Mage::getSingleton('checkout/cart')->getSummaryQty();
$total=$quote->getGrandTotal();  
$cartItems=$quote->getAllVisibleItems();
?>
Your bag contains <?php echo $count ?> item(s) <?php echo Mage::helper('core')->formatPrice($total,false) ?>
<br>
<?php foreach($cartItems as $item): ?>
    <?php echo $item->getName() ?>
    <?php echo $item->getQty() ?>
    <?php echo Mage::helper('core')->formatPrice($item->getPrice(),false) ?>
    <?php $productOptions = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct()) ?>
    <pre>
    <?php //print_r($productOptions)?>
    </pre>
    <?php foreach($productOptions as $productOption): ?>

        <!-- what should come here -->

    <?php endforeach; ?>    
<?php endforeach ?>

0 个答案:

没有答案