How Can I Get The Cart's Shipping Address In The Cart.liquid File?

- 1 answer

I'm trying to change the tax and shipping method prompt based on the user's current shipping address. Obviously, they are not yet at checkout so have not had the opportunity to input their shipping address. Is there anything else I can check at this stage to find out which country they are from?

{% if shipping_address.country_code = 'CA' %}
    <p class="cart-message meta">INCLUDING TAX AND SHIPPING (U.S. AND CANADA)</p>
{% else %}
    <p class="cart-message meta">{{ 'cart.general.tax_and_shipping' | t }} (INTERNATIONAL)</p>
{% endif %}


Shipping address at cart.liquid can only be accessed if visitor have already logged in. Else you can use third party tool to show a particular div specific to a particular country.

var txt = httpGet("");
var obj = JSON.parse(txt);
var country =;

function httpGet(theUrl)
    var xmlHttp = new XMLHttpRequest(); "GET", theUrl, false ); // false for synchronous request
    xmlHttp.send( null );
    return xmlHttp.responseText;
if(country == "CA"){
    // Show Div
  // Show Other Div


Note: IP is used to find location of visitor.