Created
May 8, 2017 11:28
-
-
Save joe-dempsey/e35813c7a4043017ce3ed0db19ae802c to your computer and use it in GitHub Desktop.
Shopify autofil checkout fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Turns out you can construct the URL like this to autofill the fields: | |
| checkoutUrl = variant.checkoutUrl() | |
| checkoutUrl += "&checkout[email]=#{email}" + | |
| "&checkout[billing_address][first_name]=#{firstName}" + | |
| "&checkout[billing_address][last_name]=#{lastName}" + | |
| "&checkout[billing_address][address1]=#{address}" + | |
| "&checkout[billing_address][city]=#{city}" + | |
| "&checkout[billing_address][country]=#{country}" + | |
| "&checkout[billing_address][zip]=#{postalCode}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment