Vendic / hyva-checkout-google-address-autocomplete

Hyvä checkout compatibility module for vendic/magento2-google-address-autocomplete
MIT License
9 stars 4 forks source link
hyva hyva-checkout

Google Address Autocomplete for the Hyvä checkout

Coding Standard

Hyvä checkout compatibility module for vendic/magento2-google-address-autocomplete.

https://github.com/Vendic/hyva-checkout-google-address-autocomplete/assets/14849044/52a1d20a-88e3-4953-a06e-c0dac096478d

Installation

This extension currently only supports PHP 8.1, while the Hyvä checkout is also compatible with PHP 7.4. Feel free to create a pull request if you want PHP 7.4 support.

composer require vendic/hyva-checkout-google-address-autocomplete

Configuration

First, create your Google Maps API key. You can find instructions on how to do this here. Also make sure you have valid billing information added to your Google account.

Set your Google Maps API key in the Magento admin panel under Stores > Configuration > Vendic > Google Address Autocomplete.

Or - even better - via the CLI:

 n98-magerun2 config:set --lock-env google_autocomplete/general/api_key $your_api_key

There is no disable/enable configuration. To disable the module, simply remove the API key from the configuration.

Features

Customizations

Field mapping

The field mapping (google address response mapped to Hyvä checkout form inputs) can be modified using di.xml. See etc/frontend/di.xml for the default mapping, which you can change edit in your own di.xml.

Input selectors

The input selectors (the fields that trigger the autocomplete dropdown ) can be modified using di.xml. By default, the autocomplete is triggered for street 0 and company.