<?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; dropdown</title>
	<atom:link href="http://blog.adin.pro/tag/dropdown/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 get countries dropdown list</title>
		<link>http://blog.adin.pro/2015-04-21/magento-get-countries-dropdown-list/</link>
		<comments>http://blog.adin.pro/2015-04-21/magento-get-countries-dropdown-list/#comments</comments>
		<pubDate>Tue, 21 Apr 2015 14:41:44 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[countries]]></category>
		<category><![CDATA[dropdown]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=467</guid>
		<description><![CDATA[<p>Create a dropdown list with magento&#8217;s countries is easy :</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-04-21/magento-get-countries-dropdown-list/">Magento get countries dropdown list</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>Create a dropdown list with magento&#8217;s countries is easy :</p>
<pre class="brush: php; title: ; notranslate">
&lt;select name=&quot;billing_country&quot; id=&quot;billing_country&quot;&gt;
&lt;?php
 $_countries = Mage::getResourceModel('directory/country_collection')-&gt;loadData()-&gt;toOptionArray(false);
 foreach($_countries as $_country)
 {
       echo '&lt;option ';
       if($this-&gt;getCustomer()-&gt;getBillingCountry() == $_country['value']){ echo 'selected '; }
       echo 'value=&quot;'.$_country['value'].'&quot;&gt;'.$_country['label'].'&lt;/option&gt;';
 }
?&gt;
&lt;/select&gt;
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2015-04-21/magento-get-countries-dropdown-list/">Magento get countries dropdown list</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-get-countries-dropdown-list/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>
	</channel>
</rss>
