This is an add-on package for adding support for the Postcode NL address validation and autocompletion to the LokiCheckout.
Current status: Stable
Portions of this module are shamelessly copied from the Trinos_PostcodeNL module. Thank you, Trinos, for kickstarting this module. Note that this module is not depending on the Trinos module though.
Install this package via composer (assuming you have setup the composer.yireo.com
repository correctly already):
composer require yireo/magento2-loki-checkout-postcode-nl
Next, enable this module:
bin/magento module:enable Yireo_LokiCheckoutPostcodeNl
Configure the Postcode NL settings via the backend (Store > Configuration > Yireo > Yireo Loki Checkout > Postcode NL) or via the CLI:
magerun2 config:set yireo_loki_checkout/postcode_nl/enable 1
magerun2 config:set yireo_loki_checkout/postcode_nl/api_key YOUR_API_KEY
magerun2 config:set yireo_loki_checkout/postcode_nl/api_secret YOUR_API_SECRET
Make sure to configure customer/address/street_lines
to be 3.
Reconfigure the address templates to make things look good:
Path customer/address_templates/html
:
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br />{{/depend}}
{{depend company}}{{var company}}<br />{{/depend}}
{{if street1}}{{var street1}}{{/if}}
{{depend street2}}{{var street2}}{{/depend}}
{{depend street3}}{{var street3}}{{/depend}}
{{depend street4}}{{var street4}}{{/depend}}<br/>
{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br />
{{var country}}<br />
{{depend telephone}}T: <a href="tel:{{var telephone}}">{{var telephone}}</a>{{/depend}}
{{depend fax}}<br />F: {{var fax}}{{/depend}}
{{depend vat_id}}<br />VAT: {{var vat_id}}{{/depend}}
This module also comes with a simple CLI command to check for specific addresses:
bin/magento loki-checkout:postcode-nl:check 1000AA 1 A
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/Yireo_LokiCheckoutPostcodeNl.git
dev-main | 25 January 2025 |
0.0.1 | 21 January 2025 |
Magento module name | Yireo_LokiCheckoutPostcodeNl |
Composer name | yireo/magento2-loki-checkout-postcode-nl |
Composer version | 0.0.1 |
Default branch | main |
Requirements |
magento/framework: ^103.0
|