I have custom module lenses which is working well, but when I try to access data of lenses model it gives me an error. This is my code
$Lenses= Mage::getModel('lenses/lenses');
foreach($Lenses as $Lens)
{
$Lens->getData('description'); //or
$Lens->getDescription();
}
Best Answer
You are trying to iterate object which is not a collection. You may try following instead:
If you want to access data of single object, you may do following: