有没有人可以指导我在标题栏中显示带有产品及其颜色,大小等选项的项目..,这是我的代码
<?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 ?>