I am bit confused about using Resourceresource model and collection Model,model. Sometimes when I see examples for loading products using specific attributes., in some examples, they use collection model and sometimes they use Resourceresource model and.
Also when can I use specific method getget...
and setset...
along with table row name..? Like getNamegetName
, getIdgetId
. I tried to use but unable get the values and it shows error.."calling: "calling undefined method in object"
$product = Mage::getModel('catalog/product')
->loadByAttribute('name', 'product_name');
echo $product->getName();
echo $product->getSku();
itIt shows undefined"undefined method getSku()...getSku()
"
ifIf I use Var_dumpvar_dump($product)
.. sku, SKU shows in object, however unable to get the SKU using getSku()
...
Thank you all :)