Yireo_LokiCheckoutPostcodeNl

Yireo LokiCheckoutPostcodeNl

This is an add-on package for adding support for the Postcode NL address validation and autocompletion to the LokiCheckout.

Current status: Stable

Thanks Trinos

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.

Installation

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

Usage

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}}

CLI usage

This module also comes with a simple CLI command to check for specific addresses:

bin/magento loki-checkout:postcode-nl:check 1000AA 1 A

Support

For getting support, create an Issue under the following project URL:

https://gitlab.yireo.com/loki-checkout/Yireo_LokiCheckoutPostcodeNl.git

Todo

Module
Module Setup
Intended functionality

Versions

dev-main 25 January 2025
0.0.1 21 January 2025

Composer details

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
magento/module-backend: ^102.0
magento/module-checkout: ^100.4
magento/module-config: ^101.0
magento/module-quote: ^101.0
yireo/magento2-loki-checkout: ~0.0.5
yireo/magento2-loki-components: ~0.0.1
composer/composer: ^2.8
psr/log: ^3.0
guzzlehttp/guzzle: ^6.0|^7.0
ext-json: *

Last modified: January 26, 2025