Shipping from USA for USA and from China for rest

New Member
1 0 0

Hello guys, 

My supplier have 2 aviable options - shipping from USA and from China. I would like to send items from USA for USA orders, and from China to rest. How should I configure it? I dont want to have in variants "ship from China or Usa - pick one". Is it possible to set shipping from China for every country except USA? Is there an app which is using location?

Please help 

Reply 1 (1)
Shopify Partner
56 2 18

Yes it is possible to show (ship from US) for your US visitors and show (Ship from China) to the rest of the world.

This need some JavaScript codes to detect the visitor IP location, then with some HTML and LIQUID code you can add a condition to show a message for US IP addresses only.

The Javascript code will look like this 

<script src=""></script>
  $.get("", function (response) {
    $("#ip").html("IP: " + response.ip);
    	document.getElementById(response.country_code).style.display = "block";
}, "jsonp");

If you're familiar with coding, you can easily implement this feature, otherwise, you must hire a professional to do it, and to tweak the code to not to slow down your product page loading time.

I hope this may help