This is the blog for getting Idea regarding PHP, Magento, jQuery and JavaScript for Customization.

Saturday 28 July 2012

Magento : Get configurable product SKU and its simple product SKU in cart


Put this code at templet/checkout/cart/item/default.phtml
at line 26 or 27
after this line "$_item = $this->getItem();"

<?php

echo $temp = $_item->getProductId();
echo "<br/>";
$_product = Mage::getModel('catalog/product')->load($temp);
echo "Config. Product :";
echo $_product->getSku();
echo "<br/>";

echo "Simple Product :";
echo $_item->getSku();

?>

No comments:

Post a Comment