diff --git a/content/applications/websites/website/configuration.rst b/content/applications/websites/website/configuration.rst index a8ea615ca..ba64f5ac8 100644 --- a/content/applications/websites/website/configuration.rst +++ b/content/applications/websites/website/configuration.rst @@ -7,6 +7,7 @@ Configuration .. toctree:: :titlesonly: + configuration/address_autocomplete configuration/cookies_bar configuration/translate configuration/multi_website diff --git a/content/applications/websites/website/configuration/address_autocomplete.rst b/content/applications/websites/website/configuration/address_autocomplete.rst new file mode 100644 index 000000000..500148cbb --- /dev/null +++ b/content/applications/websites/website/configuration/address_autocomplete.rst @@ -0,0 +1,58 @@ +==================== +Address autocomplete +==================== + +You can use the Google Places API on your website to ensure that your users' delivery addresses exist and are understood +by the carrier. The Google Places API allows developers to access detailed information about places using HTTP requests. +The autocompletion predicts a list of places when the user starts typing the address. + +.. image:: address_autocomplete/address-autocomplete-example.png + :alt: Address autocomplete example + +.. seealso:: + - `Google Maps Platform `_ + - `Google Developers Documentation: Google Places API + `_ + + +To do so, go to :menuselection:`Website --> Configuration --> Settings` and enable :guilabel:`Address Autocomplete` in +the :guilabel:`SEO` section. + +.. image:: address_autocomplete/enable-address-autocomplete.png + :alt: Enable address autocomplete + +Insert your :guilabel:`Google Places API key` in the :guilabel:`API Key` field. If you don't have one, create yours on +the `Google Cloud Console `_ and follow these steps. + +Step 1: Enable the Google Places API +==================================== + +| **Create a New Project:** +| To enable the **Google Places API**, you first need to create a project. To do so, click :guilabel:`Select a project` + in the top left corner, :guilabel:`New Project`, and follow the prompts to set up your project. + +| **Enable the Google Places API:** +| Go to the :guilabel:`Enabled APIs & Services` and click :guilabel:`+ ENABLE APIS AND SERVICES.` Search for + :guilabel:`"Places API"` and select it. Click on the :guilabel:`"Enable"` button. + +.. note:: + Google's pricing depends on the number of requests and their complexity. + +Step 2: Create API Credentials +============================== + +Go to `APIs & Services --> Credentials `_. + +| **Create credentials:** +| To create your credentials, go to :guilabel:`Credentials`, click :guilabel:`Create Credentials`, and select + :guilabel:`API key`. + +.. admonition:: Restrict the API Key (Optional) + + For security purposes, you can restrict the usage of your API key. You can go to the :guilabel:`API restrictions` + section to specify which APIs your key can access. For the Google Places API, you can restrict it to only allow + requests from specific websites or apps. + +.. important:: + - Save Your API Key: Copy your API key and securely store it. + - Do not share it publicly or expose it in client-side code. diff --git a/content/applications/websites/website/configuration/address_autocomplete/address-autocomplete-example.png b/content/applications/websites/website/configuration/address_autocomplete/address-autocomplete-example.png new file mode 100644 index 000000000..9540ea45b Binary files /dev/null and b/content/applications/websites/website/configuration/address_autocomplete/address-autocomplete-example.png differ diff --git a/content/applications/websites/website/configuration/address_autocomplete/enable-address-autocomplete.png b/content/applications/websites/website/configuration/address_autocomplete/enable-address-autocomplete.png new file mode 100644 index 000000000..fb8ba0ca3 Binary files /dev/null and b/content/applications/websites/website/configuration/address_autocomplete/enable-address-autocomplete.png differ