Get Configurable Product SKU and Its Simple Product SKU in Cart Page Magento
Put this code at templet/checkout/cart/item/default.phtml 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();
?>
<?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();
?>
Please support us, Like us on Facebook.
Subscribe to:
Post Comments (Atom)
This might be a simple question, but where are the root directories located?
ReplyDeleteI am new to Magento. Thank you.
app/design/frontend/default/[YOUR THEME]/template/checkout/cart/item/default.phtml
ReplyDeletethis might be your root directories.
It is ok.
ReplyDeletebut I changed it because of more than one product in cart
at the beginning
getItem();
$temp = $_item->getProductId();
$_product = Mage::getModel('catalog/product')->load($temp);
?>
After
getProductAdditionalInformationBlock(); ?>
setItem($_item)->toHtml() ?>
insert
getSku();?>
Now only translating or formating is to do
Mrs. Byte