Serving communities across the USA
To use an embedded address field on your website for shopping cart functionality, location data must be sent in the form of URL parameters. These parameters can be sent through the public shopping cart base page (ex: signup.websitedomainhere.net)
There are two formats that can be used to for sending data: one designed for a single-fielded address form, and one designed for a multi-fielded address form.
Example URL Format: https://signup-abcbroadband.fibersmith.systems/?fulladdress=204 Austin Ave Columbia MO 65203
Example URL Format: https://signup-abcbroadband.fibersmith.systems/?address1=204%20Austin%20Ave&city=Columbia&state=MO&zip=65203
After the address is passed, typical shopping cart behavior will occur -
If a pre-existing matching address is found, the user is redirected to the View Available Offers page of the shopping cart.
If a pre-existing matching address cannot be found, the user is placed into the shopping cart's address validation process and the shopping cart's address entry form will be auto-filled with the address information received from the provider’s website form.
Consider using Google Autocomplete to make it easier for customers to find/enter their address, and to improve the quality of addresses going into Vision - More info here - https://developers.google.com/maps/documentation/javascript/place-autocomplete
You can use Mapbox instead of Google for free to suggest addresses and send them to your cart.
Get a Mapbox API Token
Sign up at mapbox.com and create a public token with geocoding/autocomplete permissions.
Add an Input Field
Fetch Suggestions from Mapbox
Handle Selection
When a user clicks a suggestion, encode it and open the shopping cart:
Debounce input to reduce API calls.
Close the dropdown when the user clicks outside.
Works best with '&country=us'
You can use a single-field (fulladdress) or multi-field (address1, city, state, zip) URL.
Google Maps and Mapbox can help provide autocomplete suggestions and make address entry faster, but the shopping cart does not rely on these services. The only requirement is that the submitted address is valid and properly formatted. As long as a valid address is passed to the form in one of the formats below, it will work:
https://yoursite/?fulladdress=204 Austin Ave Columbia MO 65203
https://yoursite/?address1=204%20Austin%20Ave&city=Columbia&state=MO&zip=65203
The cart will then handle the rest, including:
Redirecting users to the “View Available Offers” page if a matching address exists.
Placing users into the cart’s address validation process if no match is found.
In other words, Google Maps and Mapbox are optional enhancements for user experience, but proper address validation is the only requirement for integration with the shopping cart.