<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>ActiveCodeline - Latest Comments in Getting things in Magento by getModel and getData methods</title><link>http://activecodeline.disqus.com/</link><description></description><atom:link href="http://activecodeline.disqus.com/getting_things_in_magento_by_getmodel_and_getdata_methods/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 08 Mar 2011 12:02:43 -0000</lastBuildDate><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-162436588</link><description>&lt;p&gt;&lt;br&gt;Just stumbled into your site from the search engine. Keep up the excellent work. ... &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">casual summer dresses</dc:creator><pubDate>Tue, 08 Mar 2011 12:02:43 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-162374708</link><description>&lt;p&gt;&lt;br&gt;Aw thank you , you are interesting writ er my friend. That was a great post. I will have to bookmark this site so I can read more later.&lt;br&gt; ... &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">meow mix coupons</dc:creator><pubDate>Tue, 08 Mar 2011 10:01:33 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-161964235</link><description>&lt;p&gt;&lt;br&gt;where do i get more information on this&lt;/p&gt;

&lt;p&gt;Havenspire, bring value and joy.&lt;br&gt; ... &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">how to find</dc:creator><pubDate>Mon, 07 Mar 2011 15:53:01 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-161554763</link><description>&lt;p&gt;&lt;br&gt;Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work.&lt;br&gt; ... &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">farmhouse kitchen table</dc:creator><pubDate>Sun, 06 Mar 2011 19:28:25 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-161495187</link><description>&lt;p&gt;&lt;br&gt;This seems like the most comprehensive blog on this niche&lt;/p&gt;

&lt;p&gt;Have a nice day&lt;br&gt;Gt.hunny&lt;br&gt; ... &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">meow mix coupons</dc:creator><pubDate>Sun, 06 Mar 2011 18:04:01 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-157800921</link><description>&lt;p&gt;&lt;br&gt;Really great information in your blog. Please write more so that we can get more updates in your blog. Thanks a lot!&lt;br&gt;regards&lt;br&gt;sears parts&lt;br&gt; ... &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">make a collage online</dc:creator><pubDate>Mon, 28 Feb 2011 14:41:37 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691955</link><description>&lt;p&gt;really helpful man! The only thing I cant figure out is why they dont allow you to gather a products type via getData('type');&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Devin Olsen</dc:creator><pubDate>Thu, 08 Oct 2009 01:19:34 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691953</link><description>&lt;p&gt;@Mohit&lt;/p&gt;

&lt;p&gt;There are number of articles and even some extensions you can download from this site that should cover your question.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">branko</dc:creator><pubDate>Mon, 27 Jul 2009 07:34:55 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691951</link><description>&lt;p&gt;Hi..&lt;/p&gt;

&lt;p&gt;$cModelData = $cModel-&amp;gt;getData();&lt;br&gt;echo $cModelData-&amp;gt;sku;&lt;/p&gt;

&lt;p&gt;This code isnt working. It should be following....&lt;/p&gt;

&lt;p&gt;$cModelData = $cModel-&amp;gt;getData();&lt;br&gt;echo $cModelData['sku'];&lt;/p&gt;

&lt;p&gt;Because $cModel-&amp;gt;getData() is returning array, it need to be accessed as an array element. Arrow operator here will give error.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mohit</dc:creator><pubDate>Mon, 27 Jul 2009 07:22:31 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691950</link><description>&lt;p&gt;Hi...&lt;/p&gt;

&lt;p&gt;This post is useful to get data. My question is...&lt;/p&gt;

&lt;p&gt;How can I store new record into the database...?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mohit</dc:creator><pubDate>Mon, 27 Jul 2009 07:14:36 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691949</link><description>&lt;p&gt;hiii, &lt;/p&gt;

&lt;p&gt;i have one question...&lt;/p&gt;

&lt;p&gt;when i write getData method it will give me proper data...but i am edit that data ..and now i want to save it.. so how can i save that data ???&lt;/p&gt;

&lt;p&gt;example : i make one attribute..now i fetch it on product view page now on add to cart i want to save that attribute data. so how can i do this thing ??&lt;/p&gt;

&lt;p&gt;thank you..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ravi</dc:creator><pubDate>Fri, 08 May 2009 09:16:08 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691948</link><description>&lt;p&gt;hiii,&lt;/p&gt;

&lt;p&gt;thank u for nice post. it is very very useful  post..&lt;/p&gt;

&lt;p&gt;thank you man&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ravi</dc:creator><pubDate>Fri, 08 May 2009 09:09:01 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691947</link><description>&lt;p&gt;Thanks for quick reply. One another thing I am wondering is that how magento is storing the entities values in database. I have created my own module and I have also created few attributes related to my entity_set. And I am also able to create dynamically as per magento database. Please have a look to this thread:&lt;br&gt;&lt;a href="http://www.magentocommerce.com/boards/viewthread/41408/" rel="nofollow"&gt;http://www.magentocommerce.com...&lt;/a&gt;&lt;br&gt;So if you can guide me than it will really help me to understand magento to great extent. One more thing, we can filter collection by attribute and if I want to filter my collection with field then how can I do this. Thanks in advance brother to guide me.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yogendra</dc:creator><pubDate>Thu, 07 May 2009 06:51:49 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691944</link><description>&lt;p&gt;@Yogendra&lt;/p&gt;

&lt;p&gt;Actually you can use full class name like &lt;/p&gt;

&lt;p&gt;$product = new Mage_Model_Catalog_Product();&lt;br&gt;$product-&amp;gt;load($productId);&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">branko</dc:creator><pubDate>Wed, 06 May 2009 03:55:40 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691942</link><description>&lt;p&gt;How can I create instace of Mage_Model_Catalog_Product in my phtml as I want to connect this with my helper.&lt;/p&gt;

&lt;p&gt;Second thing I want to display some attributes to my customer dashboard page where I am displaying the item list of all order's. So please guide me.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yogendra</dc:creator><pubDate>Wed, 06 May 2009 03:44:52 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691941</link><description>&lt;p&gt;Hi! &lt;/p&gt;

&lt;p&gt;thanks for nice Article&lt;/p&gt;

&lt;p&gt;But i am in wonder that how do i read the Random  Quotes through a &lt;br&gt;file in magento.Is Magento support such features or Zend Provides some built-in Libraries for that.&lt;br&gt;Please reply&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Khaliq</dc:creator><pubDate>Fri, 10 Apr 2009 10:10:34 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691940</link><description>&lt;p&gt;hi branko,&lt;/p&gt;

&lt;p&gt;can u tell me how magento search works i wanted to know where and how  magento form the query so that i can customize that query.&lt;br&gt;actually i need to add one more parameter while it search for a product.&lt;/p&gt;

&lt;p&gt;please throw some light. ASAP.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">NIRMESH</dc:creator><pubDate>Tue, 07 Apr 2009 08:00:36 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691939</link><description>&lt;p&gt;Very useful article indeed.&lt;/p&gt;

&lt;p&gt;I was wondering how I shoul use those functions to display the product details (image, descriptions...) in a light popup clicking on an image to avoid reloading the page.&lt;/p&gt;

&lt;p&gt;What should be the best way to do it, passing the product id to a js-php file that will create an instance of Mage_Catalog_Model_Product class, then load data?&lt;/p&gt;

&lt;p&gt;Could I pass the array variable $_product to dynamically generate the detail product popup ?&lt;/p&gt;

&lt;p&gt;Your suggestions are welcome :).&lt;/p&gt;

&lt;p&gt;Sylvie&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sylvie</dc:creator><pubDate>Sun, 05 Apr 2009 18:20:56 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691938</link><description>&lt;p&gt;@nirmesh&lt;/p&gt;

&lt;p&gt;Thank you for for reading my blog. This is relatively old article now :) &lt;/p&gt;

&lt;p&gt;Not sure what exactly you are trying to do in your example. Take a look at &lt;a href="http://inchoo.net" rel="nofollow"&gt;inchoo.net&lt;/a&gt; site (company I work for). You'll find few additional Magento articles by me and my co-workers. &lt;/p&gt;

&lt;p&gt;Cheers...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">branko</dc:creator><pubDate>Fri, 03 Apr 2009 09:29:49 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691937</link><description>&lt;p&gt;hi branko,&lt;/p&gt;

&lt;p&gt;thanx a lot this article proved to be very useful for me.&lt;/p&gt;

&lt;p&gt;just one doubt please clarify it:&lt;/p&gt;

&lt;p&gt;My only idea is to get an array of all product ids then have a php function randomly pick one out and get the details via a $cModel-&amp;gt;load(); and write it, then repeat!!&lt;/p&gt;

&lt;p&gt;Seems a bit long winded, &lt;/p&gt;

&lt;p&gt;is there  not any way so that i can put any variable in load so that it could retrieve all the product  information&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nirmesh</dc:creator><pubDate>Fri, 03 Apr 2009 09:25:18 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691935</link><description>&lt;p&gt;I would like to thanks Branko for this article. Very helpful. Cheers Mate for this. Much appreciated.&lt;/p&gt;

&lt;p&gt;I have put the code in this comment in case some people are still struggling to get the desired results -:&lt;/p&gt;

&lt;p&gt;This code you can copy as it is in /template/catalog/product/view.phtml file.&lt;/p&gt;

&lt;p&gt; $_helper = $this-&amp;gt;helper('catalog/output');&lt;br&gt;    $_product = $this-&amp;gt;getProduct();&lt;br&gt;    &lt;br&gt;    $cModel_PC = Mage::getModel('catalog/product');&lt;br&gt;    &lt;br&gt;    echo '';&lt;br&gt;		foreach (get_class_methods(get_class($cModel_PC)) as $cMethod) {&lt;br&gt;			echo '' . $cMethod . '';&lt;br&gt;		}&lt;br&gt;	echo '';&lt;br&gt;	&lt;br&gt;	echo '====';&lt;br&gt;	&lt;br&gt;	echo '';&lt;br&gt;		foreach (get_class_methods(get_class($_helper)) as $cMethod) {&lt;br&gt;			echo '' . $cMethod . '';&lt;br&gt;		}&lt;br&gt;	echo '';&lt;br&gt;	&lt;/p&gt;

&lt;p&gt;	$cModel_PC-&amp;gt;load($_helper-&amp;gt;productAttribute($_product, $this-&amp;gt;htmlEscape($_product-&amp;gt;getId()), 'Id'));&lt;/p&gt;

&lt;p&gt;	echo $cModel_PC-&amp;gt;getData('description');&lt;br&gt;	echo $cModel_PC-&amp;gt;getData('name');&lt;br&gt;	echo $cModel_PC-&amp;gt;getData('manufacture');&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Saggy</dc:creator><pubDate>Wed, 18 Mar 2009 07:01:42 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691933</link><description>&lt;p&gt;But how would I get a handle on the ProductAttribute Object? &lt;/p&gt;

&lt;p&gt;$attributes = Mage::getModel('catalog/product/attribute');&lt;/p&gt;

&lt;p&gt;... doesn't work. Oddly enough, it returns the Product object.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tom</dc:creator><pubDate>Thu, 19 Feb 2009 15:56:43 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691931</link><description>&lt;p&gt;Nice post.. dude... thanx that helped me a lot..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Subesh Pokhrel</dc:creator><pubDate>Mon, 05 Jan 2009 06:53:56 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691930</link><description>&lt;p&gt;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-&amp;gt;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?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">T</dc:creator><pubDate>Tue, 30 Dec 2008 16:12:40 -0000</pubDate></item><item><title>Re: Getting things in Magento by getModel and getData methods</title><link>None#comment-144691929</link><description>&lt;p&gt;Same problem here. I'm trying to create a custom module and I need to show some products, but $product-&amp;gt;getName() method doesn't return anything. Any ideas?&lt;/p&gt;

&lt;p&gt;Anyway, nice job with this blog,man. I found it very useful. Keep up the good work!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dani</dc:creator><pubDate>Sun, 21 Dec 2008 18:26:27 -0000</pubDate></item></channel></rss>
