I am new to magento and stuck on this problem, I am working on module in which I required a state
drop down dependent on country
, like one page checkout
page. I have the country
drop down. Can any one help me to show country
dependent state
drop down in my custom module.
Magento – Country dependent State/Province list in a custom module
country-regionscustommagento-1.9magento-enterprisemodule
Best Answer
Mage_Directory_Block_Data
. bcoz of this class generate country dropdown for using functiongetCountryHtmlSelect()
Then add region and country dropdown using below code at your phtml file
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');