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

Your email address will not be published. Required fields are marked *