0

To make the checkout tag more user friendly, I would like to set a country parameter in the Checkout tag. Making it display the correct shipping cost using the ip-to-nation functionality.

Installation details:

  • Expresso Store 2.4.1
  • MC Country 1.0.1
  • Expression Engine 2.9.2 (with ip2nation module enabled)
0

I am not familiar with MC Country and have not used IP2Nation in a long time but you would need to use a conditional for the shipping_country field against the data returned from IP2Nation.

<select name="shipping_country">
 <option value="US" {if ip2nation_tag_here == "US"}selected="selected"{/if}>United States</option>
 <option value="CA" {if ip2nation_tag_here == "CA"}selected="selected"{/if}>Canada</option>
</select>

and so on for each of the countries that you might ship to.

The other thing is that either you will need to update the cart with JS or have the user update the cart before you will get rates calculated.

| improve this answer | |
  • That's what I came up with. Another solution is to embed the cart from an other template, and setting the country as embed parameter. Not ideal and quite slow. – Diederik Jan 6 '15 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.