<?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: Getting product attributes values and labels</title>
	<atom:link href="http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/</link>
	<description>Just another Sharpdot weblog</description>
	<lastBuildDate>Mon, 09 Jan 2012 12:32:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-4717</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 03 Jan 2012 21:53:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-4717</guid>
		<description>Fatal error: Uncaught exception ‘Mage_Eav_Exception’ with message ‘Source model “” not found for attribute “fax”‘

This can occur if you have created the attribute but forgot to assign it to the attribute set of the product you are creating.</description>
		<content:encoded><![CDATA[<p>Fatal error: Uncaught exception ‘Mage_Eav_Exception’ with message ‘Source model “” not found for attribute “fax”‘</p>
<p>This can occur if you have created the attribute but forgot to assign it to the attribute set of the product you are creating.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike D</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-2761</link>
		<dc:creator>Mike D</dc:creator>
		<pubDate>Thu, 15 Dec 2011 18:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-2761</guid>
		<description>@magento_mk: 
1. What is contained in $a?
2. You may need to tell the collection to load other data. Look at the collection model and see what the other options are.</description>
		<content:encoded><![CDATA[<p>@magento_mk:<br />
1. What is contained in $a?<br />
2. You may need to tell the collection to load other data. Look at the collection model and see what the other options are.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magento_mk</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-2752</link>
		<dc:creator>magento_mk</dc:creator>
		<pubDate>Thu, 15 Dec 2011 16:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-2752</guid>
		<description>Hi,

I used this code source to load all product attribute names and to fill multisellect component:

$attributeArray=array();
        $attributesInfo = Mage::getResourceModel(&#039;eav/entity_attribute_collection&#039;)
        -&gt;setEntityTypeFilter(4)
        -&gt;addSetInfo()
        -&gt;getData();
        foreach ($attributesInfo as $a){
           $attributeArray[] = $a[&#039;frontend_label&#039;];
        }
        return $attributeArray;

The problem is that I got just the first letters of frontend_label and all of them are big letters. What is wrong in my source code or I have to change something other?
Many thanks in advance!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I used this code source to load all product attribute names and to fill multisellect component:</p>
<p>$attributeArray=array();<br />
        $attributesInfo = Mage::getResourceModel(&#8216;eav/entity_attribute_collection&#8217;)<br />
        -&gt;setEntityTypeFilter(4)<br />
        -&gt;addSetInfo()<br />
        -&gt;getData();<br />
        foreach ($attributesInfo as $a){<br />
           $attributeArray[] = $a['frontend_label'];<br />
        }<br />
        return $attributeArray;</p>
<p>The problem is that I got just the first letters of frontend_label and all of them are big letters. What is wrong in my source code or I have to change something other?<br />
Many thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike D</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-2669</link>
		<dc:creator>Mike D</dc:creator>
		<pubDate>Wed, 14 Dec 2011 18:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-2669</guid>
		<description>You may need to load each attribute before being able to get the options.

Here is what I would do:
1. Comment out the line where you are getting the options. I think that is what is throwing the error.

2. See if you are actually getting date out of $attribute
   A) What class is the $attribute object?</description>
		<content:encoded><![CDATA[<p>You may need to load each attribute before being able to get the options.</p>
<p>Here is what I would do:<br />
1. Comment out the line where you are getting the options. I think that is what is throwing the error.</p>
<p>2. See if you are actually getting date out of $attribute<br />
   A) What class is the $attribute object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magento_20</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-2487</link>
		<dc:creator>magento_20</dc:creator>
		<pubDate>Mon, 12 Dec 2011 16:29:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-2487</guid>
		<description>@Mike D

Thanks for your reply. this is the error,
Fatal error: Uncaught exception &#039;Mage_Eav_Exception&#039; with message &#039;Source model &quot;&quot; not found for attribute &quot;fax&quot;&#039; in /home/wpfsl/public_html/app/Mage.php:549 Stack trace: #0 /home/wpfsl/public_html/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception(&#039;Mage_Eav&#039;, &#039;Source model &quot;&quot;...&#039;) #1 /home/wpfsl/public_html/index.php(91): Mage_Eav_Model_Entity_Attribute_Abstract-&gt;getSource() #2 {main} thrown in /home/wpfsl/public_html/app/Mage.php on line 549

And your code doesn&#039;t print out the sql query, I&#039;m afraid.</description>
		<content:encoded><![CDATA[<p>@Mike D</p>
<p>Thanks for your reply. this is the error,<br />
Fatal error: Uncaught exception &#8216;Mage_Eav_Exception&#8217; with message &#8216;Source model &#8220;&#8221; not found for attribute &#8220;fax&#8221;&#8216; in /home/wpfsl/public_html/app/Mage.php:549 Stack trace: #0 /home/wpfsl/public_html/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception(&#8216;Mage_Eav&#8217;, &#8216;Source model &#8220;&#8221;&#8230;&#8217;) #1 /home/wpfsl/public_html/index.php(91): Mage_Eav_Model_Entity_Attribute_Abstract-&gt;getSource() #2 {main} thrown in /home/wpfsl/public_html/app/Mage.php on line 549</p>
<p>And your code doesn&#8217;t print out the sql query, I&#8217;m afraid.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike D</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-2486</link>
		<dc:creator>Mike D</dc:creator>
		<pubDate>Mon, 12 Dec 2011 16:22:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-2486</guid>
		<description>@ magento_20,
You need to provide a little more info.
1. What is the error that is thrown?
2. What is the sql that is run? 
Get the sql by using the following: 
&lt;code&gt;
//Put this just above your foreach
print_r($attributes-&gt;getSelect()-&gt;__toString());die(&quot;Sql&quot;);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@ magento_20,<br />
You need to provide a little more info.<br />
1. What is the error that is thrown?<br />
2. What is the sql that is run?<br />
Get the sql by using the following:<br />
<code><br />
//Put this just above your foreach<br />
print_r($attributes-&gt;getSelect()-&gt;__toString());die("Sql");<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magento_20</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-2485</link>
		<dc:creator>magento_20</dc:creator>
		<pubDate>Mon, 12 Dec 2011 16:11:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-2485</guid>
		<description>Hi there,

I am trying to retrieve attributes and all its options for Customers in Magento. This is my code
&lt;code&gt;
$attributeIds = Mage::getStoreConfig(&#039;customerattributes_options/list/attributes&#039;);
$attributes = Mage::getModel(&#039;eav/entity_attribute&#039;)-&gt;getCollection()
        -&gt;addFieldToFilter(&#039;attribute_id&#039;, array(&#039;in&#039; =&gt; $attributeIds));
		foreach ($attributes as $attribute)
    {
       echo &#039;Code: &#039;. $attribute-&gt;getId();
            echo &#039;Index: &#039; . $attribute-&gt;getCode();
             echo &#039;Header: &#039; . $attribute-&gt;getFrontendLabel();
            echo &#039;Type: &#039; . $attribute-&gt;getFrontendInput();
            echo &#039; Options: &#039; . $attribute-&gt;getSource()-&gt;getAllOptions(false);
        
    }
&lt;/code&gt;

But it throws an Error Exception and doesn&#039;t show me any options for Attributes like Gender.
Does anyone know what&#039;s the error in it?</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I am trying to retrieve attributes and all its options for Customers in Magento. This is my code<br />
<code><br />
$attributeIds = Mage::getStoreConfig('customerattributes_options/list/attributes');<br />
$attributes = Mage::getModel('eav/entity_attribute')-&gt;getCollection()<br />
        -&gt;addFieldToFilter('attribute_id', array('in' =&gt; $attributeIds));<br />
		foreach ($attributes as $attribute)<br />
    {<br />
       echo 'Code: '. $attribute-&gt;getId();<br />
            echo 'Index: ' . $attribute-&gt;getCode();<br />
             echo 'Header: ' . $attribute-&gt;getFrontendLabel();<br />
            echo 'Type: ' . $attribute-&gt;getFrontendInput();<br />
            echo ' Options: ' . $attribute-&gt;getSource()-&gt;getAllOptions(false);</p>
<p>    }<br />
</code></p>
<p>But it throws an Error Exception and doesn&#8217;t show me any options for Attributes like Gender.<br />
Does anyone know what&#8217;s the error in it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Canbey Bilgili</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-2415</link>
		<dc:creator>Canbey Bilgili</dc:creator>
		<pubDate>Sun, 11 Dec 2011 18:38:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-2415</guid>
		<description>Thanks it works. I used it for special_to_date</description>
		<content:encoded><![CDATA[<p>Thanks it works. I used it for special_to_date</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sunil rana</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-1941</link>
		<dc:creator>sunil rana</dc:creator>
		<pubDate>Tue, 01 Nov 2011 10:57:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-1941</guid>
		<description>I found good link on getting product attributes values and labels. It may help you.

http://www.phptechi.com/getting-product-attributes-values-and-labels.html</description>
		<content:encoded><![CDATA[<p>I found good link on getting product attributes values and labels. It may help you.</p>
<p><a href="http://www.phptechi.com/getting-product-attributes-values-and-labels.html" rel="nofollow">http://www.phptechi.com/getting-product-attributes-values-and-labels.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: enloz</title>
		<link>http://www.sharpdotinc.com/mdost/2009/04/06/magento-getting-product-attributes-values-and-labels/comment-page-2/#comment-1927</link>
		<dc:creator>enloz</dc:creator>
		<pubDate>Tue, 25 Oct 2011 17:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharpdotinc.com/mdost/?p=99#comment-1927</guid>
		<description>Thanks! This post helped a lot</description>
		<content:encoded><![CDATA[<p>Thanks! This post helped a lot</p>
]]></content:encoded>
	</item>
</channel>
</rss>

