diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b45707f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Vendic B.V. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Plugin/DispatchBrowserEventAfterSelect.php b/Plugin/DispatchBrowserEventAfterSelect.php new file mode 100644 index 0000000..803cde4 --- /dev/null +++ b/Plugin/DispatchBrowserEventAfterSelect.php @@ -0,0 +1,27 @@ +dispatchBrowserEvent('re-init-google-autocomplete'); + } + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..7367e09 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Hyva Checkout Hide Business Fields Google Autocomplete Compatibility Module + +This Magento 2 module ensures compatibility between the Hyva Checkout Hide Business Fields module and the Google Autocomplete module. By integrating these two modules, it allows for a smoother and more efficient checkout experience. + +## Installation + +To install this module, use Composer. Run the following command in your Magento 2 root directory: + +```bash +composer require vendic/hyva-checkout-hide-business-fields-google-autocomplete-compat +``` + +## Requirements + +- PHP ~8.2 +- [vendic/hyva-checkout-google-address-autocomplete](https://github.com/Vendic/hyva-checkout-google-address-autocomplete) ^1.2 +- [vendic/hyva-checkout-hide-business-fields](https://github.com/Vendic/hyva-checkout-hide-business-fields) ^1.0 + +## License + +This module is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details. diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..ca846e0 --- /dev/null +++ b/composer.json @@ -0,0 +1,19 @@ +{ + "name": "vendic/hyva-checkout-hide-business-fields-google-autocomplate-compat", + "description": "Compatibility module that makes the Hyva Checkout Hide Business Fields module compatible with the Google Autocomplete module", + "require": { + "php": "~8.2", + "vendic/hyva-checkout-google-address-autocomplete": "^1.2", + "vendic/hyva-checkout-hide-business-fields": "^1.0" + }, + "type": "magento2-module", + "license": ["MIT"], + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Vendic\\HyvaCheckoutHideBusinessFieldsGoogleAutocompleteCompat\\": "" + } + } +} diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml new file mode 100644 index 0000000..a1d59e8 --- /dev/null +++ b/etc/frontend/di.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/etc/module.xml b/etc/module.xml new file mode 100644 index 0000000..4c2f134 --- /dev/null +++ b/etc/module.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/registration.php b/registration.php new file mode 100644 index 0000000..6f62453 --- /dev/null +++ b/registration.php @@ -0,0 +1,7 @@ +