Help - Search - Members - Calendar
Full Version: Restricting International Customers
MonsterSmallBusiness Forums > MonsterCommerce > How do I?
I have been asking the same question once a year for the past 5 years.

I was wondering if MC now has a way for me to substitute the country dropdown list box with another one that contains only the list of countries that we are able to sell to?

Last time the MC guys said that isn't possible. Way too complicated for MC.

When I enable "Allow international shipping address" , we get orders from places we cannot ship to. We are then charged for refunding the money.

We have already put the stupid little instructions all over the place and they still order!

We are still in a pickle and need to figure this out!

Can I create dozens of custom shipping options that say "Shipping to your country is not available"?

Will that stop them?

However, in the meanwhile, we have had the international shipping addresses disabled, which costs us valuable sales to countries that we do ship to like Canada, Puerto Rico, Australia, UK, etc.

This costs us so much money that I wish I could bribe one of the geeks at MC to get in and simply change the countries in the dropdown listbox!

Yet, year after year, I get nowhere with this. The MC store is great for selling to the USA but is not good for international sales.

We get calls from many customers each week that say that they weren't able to order on our store and we have to tell them that it's a problem with our monstersmile.gif Commerce store.

MC, let me know if I can pay someone to whittle down the countries in the dropdown list box.

Can you block the country in your payment gateway? I do this in USAePay and only allow transactions from Canada and the US.

Fraud center:

country blocker:
Blocks or allows transactions based on what country they originate in. The location of the customer is based on their IP address which is checked against our GeoIP database. To use this module your shopping cart must pass the ip address to the gateway.
That might be an idea...

Although, I have - maybe I can see if I can restrict countries through them since MC is powerless or unwilling.

Still waiting to hear from a MC guy, but they usually throw my posts into the dusty old "Wish list" folder to be forgotten.
Does anyone know where I can get ahold of a script that checks IP addresses?

Maybe I can add that to my sites pages so I can redirect the customers from prohibited countries to a page that tells them that we cannot ship there.

I still think it is far simpler to remove some of the countries from the listbox, but I suppose that the MC code has the countries indexed by number instead of stringtext. Therefore, if they remove a country from the list, all of the indexes shift and screw everything up. That is not very flexible to say the least.

In normal php, html, asp, etc you can easily remove items from a dropdown listbox. It takes a few seconds...except if they are all indexed and countries are represented by the number placement order in a list.
We have the same problem. I wrote this javascript to remove the unwanted country codes from the international shipping and billing forms. Take a look at

You'll have to add/remove your country codes to the case statement and when you copy the script to the billing form, you have to change 'txtShipCountryId' to 'txtBillCountryId'. You can find the country code numbers by showing the source file from your browser, while viewing the shipping page.

Add the script by going to the monstersmile.gif control panel and clicking on Checkout->4-Step HTML. Then edit the "Shipping Address Top" and the "Billing Address Top" forms and past in the code below.

Hope this helps,


<!-- countryCodeFilter -->
<script language="JavaScript" type="text/javascript">
removeCountryCodes=function ()
var x = document.getElementsByName('txtShipCountryId');
var selIndex;
x = x[0]; // set select element
for(i=x.options.length-1; i>=0; i--)
switch (x.options[i].value)
case "0": //Default
case "36": //Canada
case "150": //Mexico
case "223": //United States
x.options[i] = null;
if (x.options.length > 0) {
x.selectedIndex = 0;
if (window.attachEvent)
<!-- end countryCodeFilter -->



Your code works!

I wish I knew this years ago.

Thanks Doug!!!!!!

Awesome Script Doug! I will be using this, thanks a bunch!
Does anyone know why this didn't work for me? I copied the code EXACTLY - I didn't even change the countries. worry.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.