Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Address country select box not populating on pop up form #164

Open
mcmanimie opened this issue Jul 3, 2019 · 3 comments
Open

Address country select box not populating on pop up form #164

mcmanimie opened this issue Jul 3, 2019 · 3 comments

Comments

@mcmanimie
Copy link

For whatever reason I cant get the Country value to populate the select control when I throw the pop up address form.

It's clearly saved but it doens't add the saved value to the control. It's empty. No errors.

I initially downloaded this theme about 7 months ago so I first made sure slate tools was updated to the latest. I then grabbed the latest addresses.js file from the repo and ran it against the stock address.liquid file. Same behavior.

No errors.

I also tried this to no avail: #74 (comment)

@mcmanimie
Copy link
Author

Nothing?

@donatasp94
Copy link

donatasp94 commented Sep 16, 2019

The problem is that in addresses.liquid, the country select element has data-default="{{ form.country }}" which outputs the country name (eg. United States), whereas addresses.js expects that value to be the country ISO code (eg. US).

Not sure there is a way to output the country ISO code with Shopify Liquid..

@jonathanmoore
Copy link
Contributor

Shopify did update their theme scripts library for better address support: https://github.com/Shopify/theme-scripts/tree/master/packages/theme-addresses

However, nothing has been rolled back into Slate or Starter Theme after Slate went into Low Maintenance mode earlier this year.
Shopify/slate#1001

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants