Friday 4 July 2014

How to Get All State List In Magento for specific country

//below code load all the State  of US
$countryCode= ‘US’;
$states = Mage::getModel('directory/country')->load($countryCode)->getRegions();
$slist= array();
foreach ($states as $state) {
$sid = $state->getId();
            $sname = $state->getName();
            $slist[$sid]=$sname;                                                              
}

asort($slist);

No comments:

Post a Comment

List OF BANK PAN Numbers

List OF BANK PAN Numbers Bank/Home Loan Providers PAN Number Allahabad Bank AACCA8464F Andhra Bank AABCA7375C Axis Bank...