How to Allow Multiple Billing Countries but Restrict Shipping in Magento

ce-1.8.1.0onestepcheckoutshippingshipping-address

I have a site and I would like to allow people from three different countries to be able to shop, but want to (for now) restrict shipping to just one country (so someone in a foreign country can buy from the store and have it sent to a friend or family member in the local country). I read here about changing the specific countries in the shipping method. I tried it, but I'm still getting all three allowed countries in both the billing and shipping address.

I'm not sure whether the "ship to same address" checkbox has something to do with it, since it's checked by default. Say my allowed countries are Spain, USA and Guatemala, but I want to have shipping available only in Guatemala. If I select USA for my billing address the checkbox should uncheck itself because I can't use the same address for shipping. Also, perhaps it has something to do with the fact that to this point I haven't selected a shipping method yet, so the shipping address country dropdown displays all three countries.

What am I doing wrong? Is what I'm trying to do possible from the admin?

Note: I'm using the OnePageCheckout extension provided by Apptha. Also, I'm new to this forum.

Best Answer

Go to \app\design\frontend\default\Your_Theme\template\checkout\onepage\shipping.phtml.

Search for the keyword "country". You will be able to locate the code for country option in shipping address. Echo the line

 <?php echo $this->getCountryHtmlSelect('shipping') ?> 

Customize the option as follows. Here i'm just trying to give you an example with shipping to only one country as US. You can get the country code in magento and customize it the way you want.

Please refer the screenshot for code

Hope this helps you.