I need to display a single State Name in Magento 1.6.2 by converting the region_id
to the state name
.
I have the region_id
and can return the array of all US states with
$states = Mage::getModel('directory/country')->load('US')->getRegions();
but cannot find a help class that converts the region_id
.
$regionId = 27;
$region = Mage::getModel('directory/region')->load($regionId);
echo $region->getName();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With