<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Agence de Développement Informatique du Nord &#187; attribute</title>
	<atom:link href="http://blog.adin.pro/tag/attribute/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adin.pro</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 26 Dec 2019 08:54:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Magento assign attribute to attribute set</title>
		<link>http://blog.adin.pro/2015-06-11/magento-assign-attribute-to-attribute-set/</link>
		<comments>http://blog.adin.pro/2015-06-11/magento-assign-attribute-to-attribute-set/#comments</comments>
		<pubDate>Thu, 11 Jun 2015 09:22:06 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[attribute_set]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=486</guid>
		<description><![CDATA[<p>This is how to assign an existing attribute to an existing attribute set</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-06-11/magento-assign-attribute-to-attribute-set/">Magento assign attribute to attribute set</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>This is how to assign an existing attribute to an existing attribute set</p>
<pre class="brush: php; title: ; notranslate">

$setup = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup('core_setup');
$setup-&gt;startSetup();

$attribute_set_name = ATTRIBUTE_SET_VISIT;
$attribute_code = $attr;
$group_name = GROUP_ADIN;

$attribute_set_id=$setup-&gt;getAttributeSetId('catalog_product', $attribute_set_name);
$attribute_group_id=$setup-&gt;getAttributeGroupId('catalog_product', $attribute_set_id, $group_name);
$attribute_id=$setup-&gt;getAttributeId('catalog_product', $attribute_code);

$setup-&gt;addAttributeToSet($entityTypeId='catalog_product',$attribute_set_id, $attribute_group_id, $attribute_id);
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-06-11/magento-assign-attribute-to-attribute-set/">Magento assign attribute to attribute set</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2015-06-11/magento-assign-attribute-to-attribute-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; retrieve attribute set by name</title>
		<link>http://blog.adin.pro/2015-06-03/magento-retrieve-attribute-set-by-name/</link>
		<comments>http://blog.adin.pro/2015-06-03/magento-retrieve-attribute-set-by-name/#comments</comments>
		<pubDate>Wed, 03 Jun 2015 14:02:48 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[attribute_set]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=480</guid>
		<description><![CDATA[<p>Here how to retrieve attribute set by name instead of id</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-06-03/magento-retrieve-attribute-set-by-name/">Magento &#8211; retrieve attribute set by name</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Here how to retrieve attribute set by name instead of id</p>
<pre class="brush: php; title: ; notranslate">
$name = &quot;Default&quot;
$attribute_set = Mage::getModel(&quot;eav/entity_attribute_set&quot;)-&gt;getCollection();
$set = $attribute_set-&gt;addFieldToFilter(&quot;attribute_set_name&quot;, $name)-&gt;getFirstItem();
echo &quot;id: &quot;.$set-&gt;getAttributeSetId();
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-06-03/magento-retrieve-attribute-set-by-name/">Magento &#8211; retrieve attribute set by name</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2015-06-03/magento-retrieve-attribute-set-by-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento create dropdown from product attribute option</title>
		<link>http://blog.adin.pro/2015-04-21/magento-create-dropdown-from-product-attribute-option/</link>
		<comments>http://blog.adin.pro/2015-04-21/magento-create-dropdown-from-product-attribute-option/#comments</comments>
		<pubDate>Tue, 21 Apr 2015 13:40:12 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[dropdown]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=463</guid>
		<description><![CDATA[<p>Here a simple but complete example to create a dropdown list for a product attribute</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-04-21/magento-create-dropdown-from-product-attribute-option/">Magento create dropdown from product attribute option</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Here a simple but complete example to create a dropdown list for a product attribute </p>
<pre class="brush: php; title: ; notranslate">
//retrieve informations
$attribute_model        = Mage::getModel('eav/entity_attribute');
$attribute_code         = $attribute_model-&gt;getIdByCode('catalog_product', 'audience');
$attribute              = $attribute_model-&gt;load($attribute_code);
$attribute_options_model= Mage::getModel('eav/entity_attribute_source_table') ;
$attribute_table        = $attribute_options_model-&gt;setAttribute($attribute);
$options                = $attribute_options_model-&gt;getAllOptions(false);

//display them
echo '&lt;select id=&quot;audience&quot; class=&quot;select&quot; name=&quot;audience&quot;&gt;';
foreach($options as $option)
{
    echo '&lt;option value=&quot;'.$option['value'].'&quot;&gt;'.$helper-&gt;__($option['label']).'&lt;/option&gt;';
}
echo '&lt;/select&gt;';
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-04-21/magento-create-dropdown-from-product-attribute-option/">Magento create dropdown from product attribute option</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2015-04-21/magento-create-dropdown-from-product-attribute-option/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; update attribute parameters programmatically</title>
		<link>http://blog.adin.pro/2015-01-13/magento-update-attribute-parameters-programmatically/</link>
		<comments>http://blog.adin.pro/2015-01-13/magento-update-attribute-parameters-programmatically/#comments</comments>
		<pubDate>Tue, 13 Jan 2015 15:17:49 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[attribute]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=442</guid>
		<description><![CDATA[<p>This is how you can update attribute parameters, the one saved in catalog_eav_attribute table In this exemple we will enable the &#8220;used_in_product_listing&#8221; params of the &#8220;code_catalogue&#8221; attribute And that&#8217;s all.</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-01-13/magento-update-attribute-parameters-programmatically/">Magento &#8211; update attribute parameters programmatically</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>This is how you can update attribute parameters, the one saved in catalog_eav_attribute table</p>
<p>In this exemple we will enable the &#8220;used_in_product_listing&#8221; params of the &#8220;code_catalogue&#8221; attribute</p>
<pre class="brush: php; title: ; notranslate">
$attributeId = Mage::getResourceModel('eav/entity_attribute')-&gt;getIdByCode('catalog_product','code_catalogue');
if ($attributeId) {
    $attribute = Mage::getModel('catalog/resource_eav_attribute')-&gt;load($attributeId);
    $attribute-&gt;setUsedInProductListing(1)-&gt;save();
}
</pre>
<p>And that&#8217;s all.</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-01-13/magento-update-attribute-parameters-programmatically/">Magento &#8211; update attribute parameters programmatically</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2015-01-13/magento-update-attribute-parameters-programmatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento : list all values of an attribute</title>
		<link>http://blog.adin.pro/2013-05-01/magento-list-all-values-of-an-attribute/</link>
		<comments>http://blog.adin.pro/2013-05-01/magento-list-all-values-of-an-attribute/#comments</comments>
		<pubDate>Wed, 01 May 2013 08:37:28 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[magento]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=170</guid>
		<description><![CDATA[<p>You want to see all values of an attribute, for debug purpose or something else ? You will get something like that :</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-05-01/magento-list-all-values-of-an-attribute/">Magento : list all values of an attribute</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You want to see all values of an attribute, for debug purpose or something else ?</p>
<pre class="brush: php; title: ; notranslate">
$attr_model = Mage::getModel('catalog/resource_eav_attribute');
$attr_model-&gt;load(959); // you can find the attribute_id on the eav_attribute table
$options = $attr_model-&gt;getSource()-&gt;getAllOptions(false);
foreach($options as $value)
{
     print_r($value);
     echo &quot;&lt;br /&gt;&quot;;
}
</pre>
<p>You will get something like that :</p>
<pre class="brush: php; title: ; notranslate">
Array
(
    [value] =&gt; 154
    [label] =&gt; 2008
)
Array
(
    [value] =&gt; 155
    [label] =&gt; 2009
)
Array
(
    [value] =&gt; 156
    [label] =&gt; 2010
)
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-05-01/magento-list-all-values-of-an-attribute/">Magento : list all values of an attribute</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-05-01/magento-list-all-values-of-an-attribute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
