I've file like app/code/local/Xx/Multistepcheckout/Block/Cart/Item/Renderer.php
In which I've function like following
public function checkItemStatus($_item, $qty, $sku) {
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
$_product = Mage::getModel('catalog/product')->load($product->getId());
$stockstatus = $_product->getXxxstatus();
//Rest of the code....
}
Here in function I don't want to use following lines
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
$_product = Mage::getModel('catalog/product')->load($product->getId());
Try 1 : So to do so I've add following code in config.xml
<global>
<sales>
<quote>
<item>
<product_attributes>
<xxxstatus />
</product_attributes>
</item>
</quote>
</sales>
</global>
And in this file app/code/local/Xx/Multistepcheckout/Block/Cart/Item/Renderer.php
I've used like $_item->getData('xxxstatus')) but it's not working.
So is there any way in which I can reduce the use of load() method?
Let me know if you want more details.