<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Getting things in Magento by getModel and getData methods</title>
	<atom:link href="http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/</link>
	<description>E-Commerce developer with Magento and Wordpress</description>
	<pubDate>Tue, 06 Jan 2009 11:55:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Subesh Pokhrel</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-1132</link>
		<dc:creator>Subesh Pokhrel</dc:creator>
		<pubDate>Mon, 05 Jan 2009 11:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-1132</guid>
		<description>Nice post.. dude... thanx that helped me a lot..</description>
		<content:encoded><![CDATA[<p>Nice post.. dude&#8230; thanx that helped me a lot..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-973</link>
		<dc:creator>T</dc:creator>
		<pubDate>Tue, 30 Dec 2008 21:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-973</guid>
		<description>I've used your blog post extensively in learning how to pull down product data but I can't seem to find a method or even anything from print_r($cModel-&#62;getData()) that would indicate where a Bundle product's price data is stored. It seems like it might be in the Tier price array (and associated arrays), but alas they are empty when I attempt to output them. Do you have any insight branko?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve used your blog post extensively in learning how to pull down product data but I can&#8217;t seem to find a method or even anything from print_r($cModel-&gt;getData()) that would indicate where a Bundle product&#8217;s price data is stored. It seems like it might be in the Tier price array (and associated arrays), but alas they are empty when I attempt to output them. Do you have any insight branko?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dani</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-873</link>
		<dc:creator>dani</dc:creator>
		<pubDate>Sun, 21 Dec 2008 23:26:27 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-873</guid>
		<description>Same problem here. I'm trying to create a custom module and I need to show some products, but $product-&#62;getName() method doesn't return anything. Any ideas?

Anyway, nice job with this blog,man. I found it very useful. Keep up the good work!</description>
		<content:encoded><![CDATA[<p>Same problem here. I&#8217;m trying to create a custom module and I need to show some products, but $product-&gt;getName() method doesn&#8217;t return anything. Any ideas?</p>
<p>Anyway, nice job with this blog,man. I found it very useful. Keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-859</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Sun, 21 Dec 2008 04:12:54 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-859</guid>
		<description>ok, so I tried using getSingleton instead by doing this:

$cSingleton = Mage::getSingleton('catalog/product');
echo '';
echo 'Product name:';
echo $cSingleton-&#62;getName();
echo '';

but I still can't figure out how to retrieve the name of the product on the page from within the breadcrumbs. Anybody?</description>
		<content:encoded><![CDATA[<p>ok, so I tried using getSingleton instead by doing this:</p>
<p>$cSingleton = Mage::getSingleton(&#8217;catalog/product&#8217;);<br />
echo &#8221;;<br />
echo &#8216;Product name:&#8217;;<br />
echo $cSingleton-&gt;getName();<br />
echo &#8221;;</p>
<p>but I still can&#8217;t figure out how to retrieve the name of the product on the page from within the breadcrumbs. Anybody?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-846</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Fri, 19 Dec 2008 19:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-846</guid>
		<description>Is it possible to use this code in say the breadcrumbs to retreive the product information of whatever page I'm on? I tried doing:

$idParams = $this-&#62;getRequest()-&#62;getParam('id');
$cModel = Mage::getModel('catalog/product');
$cModel-&#62;load($idParams);
print_r($cModel-&#62;getSku());

but even when I'm not on a product page, it still takes the ID of the page I'm on and runs it agains the product database and returns an SKU for whatever product I have that is matching up to the category page I'm on id-wise.

Is there a different way to find what the current product is that's being displayed?

Thank You so much for your tutorials. They are straightforward and easy to read, unlike the offical source.</description>
		<content:encoded><![CDATA[<p>Is it possible to use this code in say the breadcrumbs to retreive the product information of whatever page I&#8217;m on? I tried doing:</p>
<p>$idParams = $this-&gt;getRequest()-&gt;getParam(&#8217;id&#8217;);<br />
$cModel = Mage::getModel(&#8217;catalog/product&#8217;);<br />
$cModel-&gt;load($idParams);<br />
print_r($cModel-&gt;getSku());</p>
<p>but even when I&#8217;m not on a product page, it still takes the ID of the page I&#8217;m on and runs it agains the product database and returns an SKU for whatever product I have that is matching up to the category page I&#8217;m on id-wise.</p>
<p>Is there a different way to find what the current product is that&#8217;s being displayed?</p>
<p>Thank You so much for your tutorials. They are straightforward and easy to read, unlike the offical source.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anjanesh</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-821</link>
		<dc:creator>Anjanesh</dc:creator>
		<pubDate>Thu, 18 Dec 2008 05:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-821</guid>
		<description>Cool ! But most of the attribute data are index keys.
$cModel-&#62;getData('manufacturer') returns an integer (index key).
How do we retrieve the text associated with it ?</description>
		<content:encoded><![CDATA[<p>Cool ! But most of the attribute data are index keys.<br />
$cModel-&gt;getData(&#8217;manufacturer&#8217;) returns an integer (index key).<br />
How do we retrieve the text associated with it ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: branko</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-653</link>
		<dc:creator>branko</dc:creator>
		<pubDate>Tue, 02 Dec 2008 07:35:54 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-653</guid>
		<description>getModel('catalog/product') is the same as if you did new Mage_Catalog_Model_Product(), autoloading will do the job. So first you try this second approach on your module</description>
		<content:encoded><![CDATA[<p>getModel(&#8217;catalog/product&#8217;) is the same as if you did new Mage_Catalog_Model_Product(), autoloading will do the job. So first you try this second approach on your module</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ahsan Shahzad</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-652</link>
		<dc:creator>Ahsan Shahzad</dc:creator>
		<pubDate>Tue, 02 Dec 2008 07:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-652</guid>
		<description>cool post,


i need a bit explanation on this sentence of your post in sense of custom modules:

" In short getModel(’catalog/product’) says go into the /app/code/core/Mage/ folder, open the folder named product, and create an instance of Product.php file located inside the Model subfolder (to be more precise, create the instance of the class cotained inside the Product.php file)."


you told in above that getModel(’catalog/product’) will tell megento to pick the module from Mage but what if i need to pick data through my custom module, how i'll explicitly mention if it is Mage module or my custom module. Will it automatically map getModule('abc/model') ?

please explain,
thanks</description>
		<content:encoded><![CDATA[<p>cool post,</p>
<p>i need a bit explanation on this sentence of your post in sense of custom modules:</p>
<p>&#8221; In short getModel(’catalog/product’) says go into the /app/code/core/Mage/ folder, open the folder named product, and create an instance of Product.php file located inside the Model subfolder (to be more precise, create the instance of the class cotained inside the Product.php file).&#8221;</p>
<p>you told in above that getModel(’catalog/product’) will tell megento to pick the module from Mage but what if i need to pick data through my custom module, how i&#8217;ll explicitly mention if it is Mage module or my custom module. Will it automatically map getModule(&#8217;abc/model&#8217;) ?</p>
<p>please explain,<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: branko</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-214</link>
		<dc:creator>branko</dc:creator>
		<pubDate>Wed, 15 Oct 2008 10:43:01 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-214</guid>
		<description>P.S. Go to Zend Framework site and go trough some tutorials on MVC structure and passing parameters between Model, Controller, View and stuff like that. Should help you since Magento is Zend based.</description>
		<content:encoded><![CDATA[<p>P.S. Go to Zend Framework site and go trough some tutorials on MVC structure and passing parameters between Model, Controller, View and stuff like that. Should help you since Magento is Zend based.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: branko</title>
		<link>http://activecodeline.com/getting-things-in-magento-by-getmodel-and-getdata-methods/comment-page-1/#comment-213</link>
		<dc:creator>branko</dc:creator>
		<pubDate>Wed, 15 Oct 2008 10:41:46 +0000</pubDate>
		<guid isPermaLink="false">http://activecodeline.com/?p=241#comment-213</guid>
		<description>You cant call the block directly since they all contain getChildHtml... does not work, they break and you are unable to see stuff that getChildHtml is suppose to output... do the getModel(of something)-&gt;load(by some id of something) play with it. There are infinite possibilities.</description>
		<content:encoded><![CDATA[<p>You cant call the block directly since they all contain getChildHtml&#8230; does not work, they break and you are unable to see stuff that getChildHtml is suppose to output&#8230; do the getModel(of something)->load(by some id of something) play with it. There are infinite possibilities.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
