When I select a product of specific color of a configurable product and add it to cart, In cart pop up Two products are displayed one indicating the color and the other is simply the product name with image. I need to display exactly the selected color product in the cart pop up. Kindly someone help me to do this.
This is my code to display selected items in cart pop up:
<?php foreach($items as $_item): ?>
<?php $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();?>
<?php $product = $_item->getProduct(); ?>
<?php echo "<ul> <li class='item'>"; ?>
<span class="cart-img"><a href="<?php echo $product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(50, 50); ?>" width="50" height="50" alt="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>" /></a></span>
<span class="cart-name"><?php echo $_item->getName();?></span>
<span class="cart-qty"><?php echo $_item->getQty();?></span>
<span class="cart-price"><?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
<?php $url=$this->getUrl('checkout/cart/delete',array('id'=>$_item->getId())); ?>
<span class="cart_item_delete" ><a href="<?php echo $url ?>" title="<?php echo $this->__('Remove This Item') ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?></a></span>
<?php echo "</li></ul>" ?>
<?php endforeach; ?>
What should be changed here to display the exactly the configurable product with selected color?