Skip to content

Instantly share code, notes, and snippets.

@blboyle
Created May 29, 2017 14:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blboyle/d5ac9f9eb0aa7149c1660768bcb3679d to your computer and use it in GitHub Desktop.
Save blboyle/d5ac9f9eb0aa7149c1660768bcb3679d to your computer and use it in GitHub Desktop.
Add this to the bottom of your settings_scheme.json
,
{
"name": "Google Places Autocomplete",
"settings": [
{
"type": "header",
"content": "Google Places Autocomplete"
},
{
"type": "paragraph",
"content": "Adds Google Places autocomplete to customer information and billing address forms in checkout."
},
{
"type": "paragraph",
"content": "To retrieve addresses from Google, you will need to provide an API key that can access both the Google Maps JavaScript API and the Google Places API Web Service. Create a project for free at [Google's API Manager](https://console.developers.google.com/apis/)."
},
{
"type": "checkbox",
"id": "gp_enable_google_autocomplete",
"label": "Enable Google Places autocomplete modification",
"default": true,
"info": "This will leverage Google Maps API to autocomplete address inputs."
},
{
"type": "checkbox",
"id": "gp_enable_geolocate",
"label": "Enable Geolocate",
"default": true,
"info": "Biases address results to the customer's IP address' geographical location"
},
{
"type": "text",
"id": "gp_add_merchant_api_key",
"label": "Add a store specific API key",
"info": "The API key is necessary for communicating with the Google Places API."
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment