2

I try to display Product attribute in cart page like this

<?php $_item = $this->getItem()?>
<?php $_product= Mage::getSingleton('catalog/product')->load($_item->getProductId()) ?>
<?php echo $_product->getResource()->getAttribute('disable')->getFrontend()->getValue($_product); ?>

all product display same value only what mistake i done here ?

4

Change code

$_product= Mage::getSingleton('catalog/product')->load($_item->getProductId())

to:

$_product= Mage::getModel('catalog/product')->load($_item->getProductId())
1

Replace Mage::getSingleton('catalog/product') with Mage::getModel('catalog/product')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy