<?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: Magento: Add Manufacturer Column to Admin Product Grid</title>
	<atom:link href="http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/feed/" rel="self" type="application/rss+xml" />
	<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 23:20:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: pardeep kumar</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-11784</link>
		<dc:creator>pardeep kumar</dc:creator>
		<pubDate>Wed, 16 Nov 2011 13:06:47 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-11784</guid>
		<description>Hi,

i tried to add a new column for my attribute and did exactly as you guys has mentioned here.but i it fetches no value for that particular attribute. can you guys help me here.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>i tried to add a new column for my attribute and did exactly as you guys has mentioned here.but i it fetches no value for that particular attribute. can you guys help me here.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-6585</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 21 Apr 2011 19:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-6585</guid>
		<description>mad props</description>
		<content:encoded><![CDATA[<p>mad props</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brd</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-1463</link>
		<dc:creator>brd</dc:creator>
		<pubDate>Wed, 22 Sep 2010 19:17:39 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-1463</guid>
		<description>Update: 
added this  
-&gt;addAttributeToSelect(&#039;condition&#039;)

within 

protected function _prepareCollection()
    {
        $store = $this-&gt;_getStore();
        $collection = Mage::getModel(&#039;catalog/product&#039;)-&gt;getCollection()
            -&gt;addAttributeToSelect(&#039;sku&#039;)
            -&gt;addAttributeToSelect(&#039;name&#039;)
            -&gt;addAttributeToSelect(&#039;condition&#039;)

works great now</description>
		<content:encoded><![CDATA[<p>Update:<br />
added this<br />
-&gt;addAttributeToSelect(&#8216;condition&#8217;)</p>
<p>within </p>
<p>protected function _prepareCollection()<br />
    {<br />
        $store = $this-&gt;_getStore();<br />
        $collection = Mage::getModel(&#8216;catalog/product&#8217;)-&gt;getCollection()<br />
            -&gt;addAttributeToSelect(&#8216;sku&#8217;)<br />
            -&gt;addAttributeToSelect(&#8216;name&#8217;)<br />
            -&gt;addAttributeToSelect(&#8216;condition&#8217;)</p>
<p>works great now</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brd</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-1462</link>
		<dc:creator>brd</dc:creator>
		<pubDate>Wed, 22 Sep 2010 19:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-1462</guid>
		<description>Changed from manufacturer to condition for what I needed.  Worked great in adding the column and showing the options in the dropdown menu (new, used).  Unfortunately it only shows in the column near a product if I select New or Used from dropdown, if I don&#039;t select from dropdown all columns stay blank.  Does something also need to be added to by default show the option selected in each row?

Here&#039;s what I added:

$condition_items = Mage::getModel(&#039;eav/entity_attribute_option&#039;)-&gt;getCollection()-&gt;setStoreFilter()-&gt;join(&#039;attribute&#039;,&#039;attribute.attribute_id=main_table.attribute_id&#039;, &#039;attribute_code&#039;);
        foreach ($condition_items as $condition_item) :
            if ($condition_item-&gt;getAttributeCode() == &#039;condition&#039;)
                $condition_options[$condition_item-&gt;getOptionId()] = $condition_item-&gt;getValue();
        endforeach;

		$this-&gt;addColumn(&#039;condition&#039;,
            array(
                &#039;header&#039;=&gt; Mage::helper(&#039;catalog&#039;)-&gt;__(&#039;Condition&#039;),
                &#039;width&#039; =&gt; &#039;70px&#039;,
                &#039;index&#039; =&gt; &#039;condition&#039;,
                &#039;type&#039;  =&gt; &#039;options&#039;,
                &#039;options&#039; =&gt; $condition_options
        ));


Thanks for any help!</description>
		<content:encoded><![CDATA[<p>Changed from manufacturer to condition for what I needed.  Worked great in adding the column and showing the options in the dropdown menu (new, used).  Unfortunately it only shows in the column near a product if I select New or Used from dropdown, if I don&#8217;t select from dropdown all columns stay blank.  Does something also need to be added to by default show the option selected in each row?</p>
<p>Here&#8217;s what I added:</p>
<p>$condition_items = Mage::getModel(&#8216;eav/entity_attribute_option&#8217;)-&gt;getCollection()-&gt;setStoreFilter()-&gt;join(&#8216;attribute&#8217;,'attribute.attribute_id=main_table.attribute_id&#8217;, &#8216;attribute_code&#8217;);<br />
        foreach ($condition_items as $condition_item) :<br />
            if ($condition_item-&gt;getAttributeCode() == &#8216;condition&#8217;)<br />
                $condition_options[$condition_item-&gt;getOptionId()] = $condition_item-&gt;getValue();<br />
        endforeach;</p>
<p>		$this-&gt;addColumn(&#8216;condition&#8217;,<br />
            array(<br />
                &#8216;header&#8217;=&gt; Mage::helper(&#8216;catalog&#8217;)-&gt;__(&#8216;Condition&#8217;),<br />
                &#8216;width&#8217; =&gt; &#8217;70px&#8217;,<br />
                &#8216;index&#8217; =&gt; &#8216;condition&#8217;,<br />
                &#8216;type&#8217;  =&gt; &#8216;options&#8217;,<br />
                &#8216;options&#8217; =&gt; $condition_options<br />
        ));</p>
<p>Thanks for any help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-1445</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Tue, 21 Sep 2010 13:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-1445</guid>
		<description>Could you do this for &#039;cost&#039; price and how would you do it?</description>
		<content:encoded><![CDATA[<p>Could you do this for &#8216;cost&#8217; price and how would you do it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fair</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-1285</link>
		<dc:creator>fair</dc:creator>
		<pubDate>Thu, 09 Sep 2010 09:15:18 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-1285</guid>
		<description>i did try to add a custom attribute to the grid but the column stays blank...

does the attribute needs specific setting maybe?

$page_items = Mage::getModel(&#039;eav/entity_attribute_option&#039;)-&gt;getCollection()-&gt;setStoreFilter()-&gt;join(&#039;attribute&#039;,&#039;attribute.attribute_id=main_table.attribute_id&#039;, &#039;attribute_code&#039;);
        foreach ($page_items as $page_item) :
            if ($page_item-&gt;getAttributeCode() == &#039;page&#039;)
                $page_options[$page_item-&gt;getOptionId()] = $page_item-&gt;getValue();
        endforeach;
 
        $this-&gt;addColumn(&#039;page&#039;,
            array(
                &#039;header&#039;=&gt; Mage::helper(&#039;catalog&#039;)-&gt;__(&#039;Page&#039;),
                &#039;width&#039; =&gt; &#039;10px&#039;,
                &#039;type&#039;  =&gt; &#039;options&#039;,
                &#039;index&#039; =&gt; &#039;page&#039;,
                &#039;options&#039; =&gt; $page_options
        ));</description>
		<content:encoded><![CDATA[<p>i did try to add a custom attribute to the grid but the column stays blank&#8230;</p>
<p>does the attribute needs specific setting maybe?</p>
<p>$page_items = Mage::getModel(&#8216;eav/entity_attribute_option&#8217;)-&gt;getCollection()-&gt;setStoreFilter()-&gt;join(&#8216;attribute&#8217;,'attribute.attribute_id=main_table.attribute_id&#8217;, &#8216;attribute_code&#8217;);<br />
        foreach ($page_items as $page_item) :<br />
            if ($page_item-&gt;getAttributeCode() == &#8216;page&#8217;)<br />
                $page_options[$page_item-&gt;getOptionId()] = $page_item-&gt;getValue();<br />
        endforeach;</p>
<p>        $this-&gt;addColumn(&#8216;page&#8217;,<br />
            array(<br />
                &#8216;header&#8217;=&gt; Mage::helper(&#8216;catalog&#8217;)-&gt;__(&#8216;Page&#8217;),<br />
                &#8216;width&#8217; =&gt; &#8217;10px&#8217;,<br />
                &#8216;type&#8217;  =&gt; &#8216;options&#8217;,<br />
                &#8216;index&#8217; =&gt; &#8216;page&#8217;,<br />
                &#8216;options&#8217; =&gt; $page_options<br />
        ));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Pratt</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-1279</link>
		<dc:creator>Josh Pratt</dc:creator>
		<pubDate>Wed, 08 Sep 2010 22:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-1279</guid>
		<description>fair - I haven&#039;t even needed to try it on 1.4.1 yet.  Try it out.  It won&#039;t take long to test it.</description>
		<content:encoded><![CDATA[<p>fair &#8211; I haven&#8217;t even needed to try it on 1.4.1 yet.  Try it out.  It won&#8217;t take long to test it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fair</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-1274</link>
		<dc:creator>fair</dc:creator>
		<pubDate>Wed, 08 Sep 2010 19:22:45 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-1274</guid>
		<description>hi Josh

should this code work with 1.4.1?

THX</description>
		<content:encoded><![CDATA[<p>hi Josh</p>
<p>should this code work with 1.4.1?</p>
<p>THX</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Pratt</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-374</link>
		<dc:creator>Josh Pratt</dc:creator>
		<pubDate>Fri, 16 Apr 2010 12:58:54 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-374</guid>
		<description>kurt,

Well, if you follow the instructions quick and do it on your own installation of Magento, you would be able to.</description>
		<content:encoded><![CDATA[<p>kurt,</p>
<p>Well, if you follow the instructions quick and do it on your own installation of Magento, you would be able to.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kurt</title>
		<link>http://prattski.com/2010/03/11/magento-add-manufacturer-column-to-admin-product-grid/#comment-373</link>
		<dc:creator>kurt</dc:creator>
		<pubDate>Fri, 09 Apr 2010 08:24:34 +0000</pubDate>
		<guid isPermaLink="false">http://devzone.pratthost.com/?p=386#comment-373</guid>
		<description>can i see the output of this code?</description>
		<content:encoded><![CDATA[<p>can i see the output of this code?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

