Get countryID from selected / entered shipping address magento
Posted by navaneeth on Feb 7, 2014 in Magento, Php | No comments yet
Some times we need to get countryid from selected/entered shipping address, As the checkout page is completely driven by ajax we need to utilize any page which is refreshed like the available shipping methods block
so when ever there is an change in the shipping address it gets reflected on the refreshed shipping method block
The location of the file will be
app/design/{base}/{default}/template/checkout/onepage/shipping_method.phtml
And the code to get the countryID is
Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getData('country_id');
Leave a Reply