Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Supporting country pre-population on v2.0 Checkout?

pixelchutespixelchutes Member
in Bugs & Feature Requests edited October 2015
According to
pre-populating the country isn't supported that because it interferes with the geo IP / auto select logic?

Is there a possible work-around using hidden fields to get the country value to use a predetermined value? I know this kind of unofficial approach was possible back on v0.6.0, I'm just curious if there's something specific that needs accounting for on v2.0 that would prevent the desired outcome with some custom code?


FC.client.on('ready', function () {
// Country pre-pop workaround
if( typeof != 'undefined' ){
if( != '' ){ =;
From my basic testing, this seems to work on the surface. I guess the other check could be to run some validation to ensure provided ISO code was valid? (Though this seems to be covered in the form submission step as-is.) Is there anything I might be missing here?
  • fc_adamfc_adam FoxyCart Team

    That approach would be what I'd recommend. You would want to ensure that the template is updated accordingly though. You can do that by triggering the template re-render like this:

    FC.checkout.renderCustomerBilling() or FC.checkout.renderCustomerShipping()

  • pixelchutespixelchutes Member
    edited October 2015
    Thanks, Adam. Good point!

    I happen to have had a FC.checkout.render() already in place for some custom handling covering multiple portions of the layout, which would explain why it was working!

    Good to know it technically is supported, just not "out-of-the-box."
Sign In or Register to comment.