From 355a585134f721506da47ff6cda0ffc2f346328f Mon Sep 17 00:00:00 2001 From: Vincent 't Hart Date: Mon, 25 Jul 2022 17:30:24 +0200 Subject: [PATCH 01/14] POSTCODENL-202: update readme --- README.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f255234..1e8af76 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,82 @@ -# TIG Postcode validation Magento 2 +

-[![Coverage Status](https://coveralls.io/repos/github/tig-nl/postcode-magento2/badge.svg?branch=%28no+branch%29)](https://coveralls.io/github/tig-nl/postcode-magento2?branch=%28no+branch%29) [![Build Status](https://travis-ci.org/tig-nl/postcode-magento2.svg?branch=master)](https://travis-ci.org/tig-nl/postcode-magento2) +# TIG Postcode Service Magento 2 +[![Lastest Stable Version](https://img.shields.io/github/v/release/tig-nl/postcode-magento2?style=for-the-badge&color=227cff)](https://github.com/tig-nl/postcode-magento2/releases/latest) +![TIG Postcode Service 2.3.7 versions](https://img.shields.io/badge/Tested%20with%20Magento-2.3.7-%2300cf00?style=for-the-badge) +![TIG Postcode Service 2.4.4 versions](https://img.shields.io/badge/Tested%20with%20Magento-2.4.4-%2300cf00?style=for-the-badge) +[![Total Extension downloads](https://img.shields.io/packagist/dt/tig/postcode-magento2?style=for-the-badge&color=227cff)](https://packagist.org/packages/tig-nl/postcode-magento2/stats) +![Build Status](https://img.shields.io/travis/tig-nl/postcode-magento2/master?style=for-the-badge) -Install the extension with composer + +## Requirements +- Magento version 2.4.4, 2.4.3, 2.3.6 or 2.3.7 +- PHP 7.3+ + +## Installation +We strongly recommend that you use a Staging Environment for the installation, and to also make a backup of your environment. + +### Installation using composer (recommended) +To install the extension login to your environment using SSH. Then navigate to the Magento 2 root directory and run the following commands in the same order as described: + +Enable maintenance mode: +~~~~shell +php bin/magento maintenance:enable ~~~~ + +1. Install the extension: +~~~~shell composer require tig/postcode-magento2 ~~~~ +2. Enable the Postcode Service Magento 2 plugin +~~~~shell +php bin/magento module:enable TIG_Postcode +~~~~ + +3. Update the Magento 2 environment: +~~~~shell +php bin/magento setup:upgrade +~~~~ + +When your Magento environment is running in production mode, you also need to run the following comands: + +4. Compile DI: +~~~~shell +php bin/magento setup:di:compile +~~~~ + +5. Deploy static content: +~~~~shell +php bin/magento setup:static-content:deploy +~~~~ + +6. Disable maintenance mode: +~~~~shell +php bin/magento maintenance:disable +~~~~ + +### Installation manually +1. Download the extension directly from [github](https://github.com/tig-nl/postcode-magento2) by clicking on *Code* and then *Download ZIP*. +2. Create the directory *app/code/TIG/Postcode* (Case-sensitive) +3. Extract the zip and upload the code into *app/code/TIG/Postcode* +4. Enable the Postcode Service Magento 2 plugin +~~~~shell +php bin/magento module:enable TIG_Postcode +~~~~ + +5. Update the Magento 2 environment: +~~~~shell +php bin/magento setup:upgrade +~~~~ + +## Update +To update the Postcode Service Extension run the following commands: +~~~~shell +composer update tig/postcode-magento2 +php bin/magento setup:upgrade +~~~~ + +## Documentation For further installation guidance -https://developers.postcodeservice.com/ +https://developers.postcodeservice.com/ \ No newline at end of file From c5758aa45c1d57699cf3fee3fc928422f87bb23a Mon Sep 17 00:00:00 2001 From: Vincent 't Hart Date: Thu, 11 Aug 2022 17:17:51 +0200 Subject: [PATCH 02/14] added jobs --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1e8af76..4d2c9c4 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ php bin/magento maintenance:enable composer require tig/postcode-magento2 ~~~~ -2. Enable the Postcode Service Magento 2 plugin +2. Enable the Postcode Service Magento 2 extension ~~~~shell php bin/magento module:enable TIG_Postcode ~~~~ @@ -59,7 +59,7 @@ php bin/magento maintenance:disable 1. Download the extension directly from [github](https://github.com/tig-nl/postcode-magento2) by clicking on *Code* and then *Download ZIP*. 2. Create the directory *app/code/TIG/Postcode* (Case-sensitive) 3. Extract the zip and upload the code into *app/code/TIG/Postcode* -4. Enable the Postcode Service Magento 2 plugin +4. Enable the Postcode Service Magento 2 extension ~~~~shell php bin/magento module:enable TIG_Postcode ~~~~ @@ -79,4 +79,7 @@ php bin/magento setup:upgrade ## Documentation For further installation guidance -https://developers.postcodeservice.com/ \ No newline at end of file +https://developers.postcodeservice.com/ + +## Join our team +Are you a motivated developer and do you want to work on projects like the Postcode Service and other interesting software projects? Checkout our job offers: https://tigersatwork.nl/ \ No newline at end of file From 1e6566ea7ebf9ebe00ee54f508a41054aaaeffe5 Mon Sep 17 00:00:00 2001 From: Kevin van Dijk Date: Mon, 22 Aug 2022 16:46:26 +0200 Subject: [PATCH 03/14] POSTCODENL-409 hide fields and dont do anything when extension mode is off --- Plugin/Model/ResourceModel/Country/CollectionPlugin.php | 4 ++-- view/base/web/js/postcode-handler/postcode-handler.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugin/Model/ResourceModel/Country/CollectionPlugin.php b/Plugin/Model/ResourceModel/Country/CollectionPlugin.php index 7b6074e..3b3d36b 100644 --- a/Plugin/Model/ResourceModel/Country/CollectionPlugin.php +++ b/Plugin/Model/ResourceModel/Country/CollectionPlugin.php @@ -75,7 +75,7 @@ public function __construct( private function getPostcodeNLConfig($sortOrderBase, $sortOrderIncrement): array { return [ - 'enabled' => $this->moduleConfiguration->isNLCheckEnabled(), + 'enabled' => $this->moduleConfiguration->isNLCheckEnabled() && !$this->moduleConfiguration->isModusOff(), 'postcode' => [ 'sortOrder' => $sortOrderBase, 'classes' => [ @@ -136,7 +136,7 @@ private function getPostcodeNLConfig($sortOrderBase, $sortOrderIncrement): array */ private function getPostcodeBEConfig($sortOrderBase, $sortOrderIncrement) { return [ - 'enabled' => $this->moduleConfiguration->isBECheckEnabled(), + 'enabled' => $this->moduleConfiguration->isBECheckEnabled() && !$this->moduleConfiguration->isModusOff(), 'postcode' => [ 'sortOrder' => $sortOrderBase, 'classes' => [ diff --git a/view/base/web/js/postcode-handler/postcode-handler.js b/view/base/web/js/postcode-handler/postcode-handler.js index f347742..19b76c8 100644 --- a/view/base/web/js/postcode-handler/postcode-handler.js +++ b/view/base/web/js/postcode-handler/postcode-handler.js @@ -134,11 +134,11 @@ define([ */ PostcodeHandler.prototype.reset = function() { if (!('tig_postcode' in this.config) || this.config.tig_postcode['enabled'] === false) { - this.currentState = STATE_DISABLED; + this.setCurrentState(STATE_DISABLED); return; } - this.currentState = STATE_INIT; + this.setCurrentState(STATE_INIT); this.postcodeService.setFieldsConfig(this.config.tig_postcode); } From 195c871418081386796b5355000756f3fdeeded5 Mon Sep 17 00:00:00 2001 From: Vincent 't Hart Date: Fri, 26 Aug 2022 16:56:16 +0200 Subject: [PATCH 04/14] Added images and vacancies --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 4d2c9c4..1df6345 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,13 @@ composer update tig/postcode-magento2 php bin/magento setup:upgrade ~~~~ +## Examples + +### Dutch Postcode Service within the Magento 2 checkout +![Postcode Service Magento 2 Checkout NL](https://postcodeservice.com/wp-content/uploads/2022/08/postcodeservice-magento-2-nl.gif "Postcode Service Magento 2 Checkout NL") + +### Belgium Postcode Service within the Magento 2 checkout +![Postcode Service Magento 2 Checkout BE](https://postcodeservice.com/wp-content/uploads/2022/08/postcodeservice-magento-2-be.gif "Postcode Service Magento 2 Checkout NL") ## Documentation For further installation guidance From 88cd0ecc8ddd5c0a0d1686c9ad82313c2f229b59 Mon Sep 17 00:00:00 2001 From: Vincent 't Hart Date: Thu, 22 Sep 2022 14:50:43 +0200 Subject: [PATCH 05/14] fixed typo and update versions --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1df6345..06f363a 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@

# TIG Postcode Service Magento 2 -[![Lastest Stable Version](https://img.shields.io/github/v/release/tig-nl/postcode-magento2?style=for-the-badge&color=227cff)](https://github.com/tig-nl/postcode-magento2/releases/latest) +[![Latest Stable Version](https://img.shields.io/github/v/release/tig-nl/postcode-magento2?style=for-the-badge&color=227cff)](https://github.com/tig-nl/postcode-magento2/releases/latest) ![TIG Postcode Service 2.3.7 versions](https://img.shields.io/badge/Tested%20with%20Magento-2.3.7-%2300cf00?style=for-the-badge) -![TIG Postcode Service 2.4.4 versions](https://img.shields.io/badge/Tested%20with%20Magento-2.4.4-%2300cf00?style=for-the-badge) +![TIG Postcode Service 2.4.5 versions](https://img.shields.io/badge/Tested%20with%20Magento-2.4.5-%2300cf00?style=for-the-badge) [![Total Extension downloads](https://img.shields.io/packagist/dt/tig/postcode-magento2?style=for-the-badge&color=227cff)](https://packagist.org/packages/tig-nl/postcode-magento2/stats) ![Build Status](https://img.shields.io/travis/tig-nl/postcode-magento2/master?style=for-the-badge) ## Requirements -- Magento version 2.4.4, 2.4.3, 2.3.6 or 2.3.7 +- Magento version 2.4.5, 2.4.4, 2.3.7 or 2.3.6 - PHP 7.3+ ## Installation From 268f0353e1305bf848efd7ddcea484b7c14eb5dd Mon Sep 17 00:00:00 2001 From: Vincent 't Hart Date: Mon, 28 Nov 2022 16:13:46 +0100 Subject: [PATCH 06/14] POSTCODENL-447: fix for error beforeSavePaymentInformation --- .../Model/GuestPaymentInformationManagement.php | 11 ++++++----- .../Checkout/Model/PaymentInformationManagement.php | 8 +++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Plugin/Checkout/Model/GuestPaymentInformationManagement.php b/Plugin/Checkout/Model/GuestPaymentInformationManagement.php index 43b2ede..a1e7450 100644 --- a/Plugin/Checkout/Model/GuestPaymentInformationManagement.php +++ b/Plugin/Checkout/Model/GuestPaymentInformationManagement.php @@ -60,13 +60,14 @@ public function __construct( * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSavePaymentInformation( - \Magento\Checkout\Model\GuestPaymentInformationManagement $subject, + \Magento\Checkout\Model\PaymentInformationManagement $subject, $cartId, - $email, PaymentInterface $paymentMethod, - AddressInterface $address + AddressInterface $address = null ) { - $extAttributes = $address->getExtensionAttributes(); - $this->fieldsHelper->copyFieldsFromExtensionAttributesToObject($extAttributes, $address); + if ($address) { + $extAttributes = $address->getExtensionAttributes(); + $this->fieldsHelper->copyFieldsFromExtensionAttributesToObject($extAttributes, $address); + } } } diff --git a/Plugin/Checkout/Model/PaymentInformationManagement.php b/Plugin/Checkout/Model/PaymentInformationManagement.php index c4c3d19..b3e18e3 100644 --- a/Plugin/Checkout/Model/PaymentInformationManagement.php +++ b/Plugin/Checkout/Model/PaymentInformationManagement.php @@ -32,9 +32,11 @@ public function beforeSavePaymentInformation( \Magento\Checkout\Model\PaymentInformationManagement $subject, $cartId, PaymentInterface $paymentMethod, - AddressInterface $address + AddressInterface $address = null ) { - $extAttributes = $address->getExtensionAttributes(); - $this->fieldsHelper->copyFieldsFromExtensionAttributesToObject($extAttributes, $address); + if ($address) { + $extAttributes = $address->getExtensionAttributes(); + $this->fieldsHelper->copyFieldsFromExtensionAttributesToObject($extAttributes, $address); + } } } From 31575ec333fd1381a78977826e2871e467c630d6 Mon Sep 17 00:00:00 2001 From: Vincent 't Hart Date: Mon, 28 Nov 2022 16:15:58 +0100 Subject: [PATCH 07/14] Removed join the team section --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 06f363a..2bb7dc4 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,3 @@ php bin/magento setup:upgrade ## Documentation For further installation guidance https://developers.postcodeservice.com/ - -## Join our team -Are you a motivated developer and do you want to work on projects like the Postcode Service and other interesting software projects? Checkout our job offers: https://tigersatwork.nl/ \ No newline at end of file From 9d5f574cd994f0cf637c047c33282b9b4b018f54 Mon Sep 17 00:00:00 2001 From: Mickey Beijer Date: Mon, 28 Nov 2022 16:56:28 +0100 Subject: [PATCH 08/14] POSTCODENL-437 : fixed php 8.1 deprecation errors --- Plugin/Model/Checkout/LayoutProcessorPlugin.php | 2 +- Plugin/Model/Osc/LayoutProcessorPlugin.php | 2 +- Services/Validation/Response.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugin/Model/Checkout/LayoutProcessorPlugin.php b/Plugin/Model/Checkout/LayoutProcessorPlugin.php index 526bc7d..0b5e2ad 100644 --- a/Plugin/Model/Checkout/LayoutProcessorPlugin.php +++ b/Plugin/Model/Checkout/LayoutProcessorPlugin.php @@ -152,7 +152,7 @@ public function createHousenumberFieldsDefinition($dataScope) */ private function getParentPath($path, $delimiter = '/', $count = 1) { - $splitPath = explode($delimiter, $path); + $splitPath = !empty($path) ? explode($delimiter, $path) : []; for ($i = 0; $i < $count; $i++) { array_pop($splitPath); } diff --git a/Plugin/Model/Osc/LayoutProcessorPlugin.php b/Plugin/Model/Osc/LayoutProcessorPlugin.php index 00ce5f1..9b29d0a 100644 --- a/Plugin/Model/Osc/LayoutProcessorPlugin.php +++ b/Plugin/Model/Osc/LayoutProcessorPlugin.php @@ -152,7 +152,7 @@ public function createHousenumberFieldsDefinition($dataScope) */ private function getParentPath($path, $delimiter = '/', $count = 1) { - $splitPath = explode($delimiter, $path); + $splitPath = !empty($path) ? explode($delimiter, $path) : []; for ($i = 0; $i < $count; $i++) { array_pop($splitPath); } diff --git a/Services/Validation/Response.php b/Services/Validation/Response.php index 3b1053b..95d90fe 100644 --- a/Services/Validation/Response.php +++ b/Services/Validation/Response.php @@ -99,7 +99,7 @@ private function checkKeys($data) */ private function checkStreetNameValue($data) { - if (strpos($data['straatnaam'], 'limiet bereikt') !== false) { + if (strpos($data['straatnaam'] ?? '', 'limiet bereikt') !== false) { return false; } From 8a1d608b86d7e4b04fbec35734f11e82dc521d10 Mon Sep 17 00:00:00 2001 From: Vincent 't Hart Date: Mon, 28 Nov 2022 17:38:38 +0100 Subject: [PATCH 09/14] feedback on PR --- Plugin/Checkout/Model/PaymentInformationManagement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin/Checkout/Model/PaymentInformationManagement.php b/Plugin/Checkout/Model/PaymentInformationManagement.php index b3e18e3..15d3281 100644 --- a/Plugin/Checkout/Model/PaymentInformationManagement.php +++ b/Plugin/Checkout/Model/PaymentInformationManagement.php @@ -29,7 +29,7 @@ public function __construct( * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSavePaymentInformation( - \Magento\Checkout\Model\PaymentInformationManagement $subject, + \Magento\Checkout\Model\GuestPaymentInformationManagement $subject, $cartId, PaymentInterface $paymentMethod, AddressInterface $address = null From 54cf2fb68b2b75a349e91c52ff02aa1125dd783c Mon Sep 17 00:00:00 2001 From: Vincent 't Hart Date: Mon, 28 Nov 2022 17:43:05 +0100 Subject: [PATCH 10/14] feedback on PR --- Plugin/Checkout/Model/GuestPaymentInformationManagement.php | 3 ++- Plugin/Checkout/Model/PaymentInformationManagement.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugin/Checkout/Model/GuestPaymentInformationManagement.php b/Plugin/Checkout/Model/GuestPaymentInformationManagement.php index a1e7450..14c5c94 100644 --- a/Plugin/Checkout/Model/GuestPaymentInformationManagement.php +++ b/Plugin/Checkout/Model/GuestPaymentInformationManagement.php @@ -60,8 +60,9 @@ public function __construct( * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSavePaymentInformation( - \Magento\Checkout\Model\PaymentInformationManagement $subject, + \Magento\Checkout\Model\GuestPaymentInformationManagement $subject, $cartId, + $email, PaymentInterface $paymentMethod, AddressInterface $address = null ) { diff --git a/Plugin/Checkout/Model/PaymentInformationManagement.php b/Plugin/Checkout/Model/PaymentInformationManagement.php index 15d3281..b3e18e3 100644 --- a/Plugin/Checkout/Model/PaymentInformationManagement.php +++ b/Plugin/Checkout/Model/PaymentInformationManagement.php @@ -29,7 +29,7 @@ public function __construct( * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function beforeSavePaymentInformation( - \Magento\Checkout\Model\GuestPaymentInformationManagement $subject, + \Magento\Checkout\Model\PaymentInformationManagement $subject, $cartId, PaymentInterface $paymentMethod, AddressInterface $address = null From 9b47999712242e3918402ca0dbd48d35325ef0c7 Mon Sep 17 00:00:00 2001 From: Michiel Vonk Date: Wed, 14 Dec 2022 09:36:09 +0100 Subject: [PATCH 11/14] Hide TIG Street by default --- Plugin/Model/ResourceModel/Country/CollectionPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugin/Model/ResourceModel/Country/CollectionPlugin.php b/Plugin/Model/ResourceModel/Country/CollectionPlugin.php index 7b6074e..88eee64 100644 --- a/Plugin/Model/ResourceModel/Country/CollectionPlugin.php +++ b/Plugin/Model/ResourceModel/Country/CollectionPlugin.php @@ -103,7 +103,7 @@ private function getPostcodeNLConfig($sortOrderBase, $sortOrderIncrement): array ], 'tig_street' => [ 'sortOrder' => $sortOrderBase + 3 * $sortOrderIncrement, - 'visible' => true, + 'visible' => false, 'classes' => [ 'tig_street_field' => true, 'tig_postcode_nl' => true From 30ab9f8788ffa0cef09f49d6d0adfe03a3345e6e Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 19 Dec 2022 11:24:53 +0100 Subject: [PATCH 12/14] Added POSTCODENL-391 manually --- i18n/en_US.csv | 1 + i18n/fr_FR.csv | 1 + i18n/nl_BE.csv | 6 +++--- i18n/nl_NL.csv | 6 +++--- view/base/web/js/postcode-handler/postcode-nl.js | 8 +++++--- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/i18n/en_US.csv b/i18n/en_US.csv index bb94626..7150460 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -32,6 +32,7 @@ Extension status,Extension status "Can not find the address, please fill in manually","Can not find the address, please fill in manually" "Housenumber","Housenumber" "Addition","Addition" +"Housenumber addition","Housenumber addition" "Please select a postcode before filling the street field.","Please select a postcode before filling the street field." "Enable Netherlands check","Enable Netherlands check" "Enable Belgium check","Enable Belgium check" diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 9eda719..1f69f62 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -32,6 +32,7 @@ Disabled,Désactivé "Can not find the address, please fill in manually","Adresse introuvable, veuillez la renseigner manuellement" "Housenumber","Numéro" "Addition","Complément d'adresse" +"Housenumber addition","Ajout de numéro de maison" "Please select a postcode before filling the street field.","Veuillez sélectionner un code postal avant de renseigner le chanp Adresse" "Enable Netherlands check","Activer la vérification pour les Pays-Bas" "Enable Belgium check","Activer la vérification pour la Belgique" diff --git a/i18n/nl_BE.csv b/i18n/nl_BE.csv index d4276cd..6e3c058 100644 --- a/i18n/nl_BE.csv +++ b/i18n/nl_BE.csv @@ -30,15 +30,15 @@ Support,Support "Support by phone","Telefonisch support" "24/7 SLA support","24/7 SLA support" "Can not find the address, please fill in manually","Het adres kan niet gevonden worden, vul alsjeblieft handmatig in" -"House number","Huisnummer" +"Housenumber","Huisnummer" "Addition","Bus" - +"Housenumber addition","Huisnummer toevoeging" "Back-end merging","Back-end samenvoeging" "These settings have impact on how street address data is stored in the database.","Deze instellingen hebben invloed op hoe adres data wordt opgeslagen in de database." "Tampering with the settings may affect the workflow of third party extensions. Use at your own risk.","Het aanpassen van deze instellingen kan de werking van extensies van derden beïnvloeden. Gebruik op eigen risico." "Street address field","Straatnaam veld" "House number field","Huisnummer veld" -"House number addition field","Toevoeging veld" +"Housenumber addition field","Toevoeging veld" "Street address line %1","Adres regel %1" "These settings have no impact on the front-end.","Deze instellingen hebben geen invloed op de frontend." "This extension is developed by Total Internet Group (TIG).","Deze instellingen hebben geen invloed op de frontend." diff --git a/i18n/nl_NL.csv b/i18n/nl_NL.csv index 7bc7a35..d775d4a 100644 --- a/i18n/nl_NL.csv +++ b/i18n/nl_NL.csv @@ -30,15 +30,15 @@ Support,Support "Support by phone","Telefonisch support" "24/7 SLA support","24/7 SLA support" "Can not find the address, please fill in manually","Het adres kan niet gevonden worden, vul alsjeblieft handmatig in" -"House number","Huisnummer" +"Housenumber","Huisnummer" "Addition","Toevoeging" - +"Housenumber addition","Huisnummer toevoeging" "Back-end merging","Back-end samenvoeging" "These settings have impact on how street address data is stored in the database.","Deze instellingen hebben invloed op hoe adres data wordt opgeslagen in de database." "Tampering with the settings may affect the workflow of third party extensions. Use at your own risk.","Het aanpassen van deze instellingen kan de werking van extensies van derden beïnvloeden. Gebruik op eigen risico." "Street address field","Straatnaam veld" "House number field","Huisnummer veld" -"House number addition field","Toevoeging veld" +"Housenumber addition field","Toevoeging veld" "Street address line %1","Adres regel %1" "These settings have no impact on the front-end.","Deze instellingen hebben geen invloed op de frontend." "This extension is developed by Total Internet Group (TIG).","Deze instellingen hebben geen invloed op de frontend." diff --git a/view/base/web/js/postcode-handler/postcode-nl.js b/view/base/web/js/postcode-handler/postcode-nl.js index 0284930..741694c 100644 --- a/view/base/web/js/postcode-handler/postcode-nl.js +++ b/view/base/web/js/postcode-handler/postcode-nl.js @@ -33,13 +33,15 @@ define([ 'underscore', './postcode-handler', '../helper/field-types', - '../helper/postcode-api' + '../helper/postcode-api', + 'mage/translate' ], function ( $, _, PostcodeHandler, FieldTypes, - PostcodeApi + PostcodeApi, + $t ) { 'use strict'; @@ -84,7 +86,7 @@ define([ if (data.success !== true) { self.setCurrentState(states.POSTCODE_CALL_FAILED); - self.getPostcodeService().getElement(FieldTypes.postcode).error('Sorry, we could not find the address on the given zip code and house number combination. If you are sure that the zip code and house number are correct, please fill in the address details manually.'); + self.getPostcodeService().getElement(FieldTypes.postcode).error($t('Sorry, we could not find the address on the given zip code and house number combination. If you are sure that the zip code and house number are correct, please fill in the address details manually.')); return; } From f661da661b8d12ea3b727bb394dc5c2548930c64 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 19 Dec 2022 11:35:48 +0100 Subject: [PATCH 13/14] Version bump --- Block/Adminhtml/Config/Support/Tab.php | 2 +- README.md | 2 +- Test/Unit/Block/Adminhtml/Config/Support/TabTest.php | 2 +- composer.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Block/Adminhtml/Config/Support/Tab.php b/Block/Adminhtml/Config/Support/Tab.php index bf8883d..51298c1 100644 --- a/Block/Adminhtml/Config/Support/Tab.php +++ b/Block/Adminhtml/Config/Support/Tab.php @@ -40,7 +40,7 @@ class Tab extends Template implements RendererInterface { const MODULE_NAME = 'TIG_Postcode'; - const EXTENSION_VERSION = '1.5.1'; + const EXTENSION_VERSION = '1.5.2'; // @codingStandardsIgnoreLine protected $_template = 'TIG_Postcode::config/support/tab.phtml'; diff --git a/README.md b/README.md index 2bb7dc4..5865540 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

-# TIG Postcode Service Magento 2 +# Postcode Service Magento 2 [![Latest Stable Version](https://img.shields.io/github/v/release/tig-nl/postcode-magento2?style=for-the-badge&color=227cff)](https://github.com/tig-nl/postcode-magento2/releases/latest) ![TIG Postcode Service 2.3.7 versions](https://img.shields.io/badge/Tested%20with%20Magento-2.3.7-%2300cf00?style=for-the-badge) ![TIG Postcode Service 2.4.5 versions](https://img.shields.io/badge/Tested%20with%20Magento-2.4.5-%2300cf00?style=for-the-badge) diff --git a/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php b/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php index 5211bde..53ccae3 100644 --- a/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php +++ b/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php @@ -42,7 +42,7 @@ class TabTest extends TestCase public function testGetVersionNumber() { $instance = $this->getInstance(); - $this->assertSame('1.5.1', $instance->getVersionNumber()); + $this->assertSame('1.5.2', $instance->getVersionNumber()); } public function testGetSupportedMagentoVersions() diff --git a/composer.json b/composer.json index eca67c0..e109dd3 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "magento/module-quote": ">=101.0.5,<=101.0.11|~101.1|~101.2" }, "type": "magento2-module", - "version": "1.5.1", + "version": "1.5.2", "license": "CC-BY-NC-ND-3.0", "authors": [ { From 7f0fa280c516b4682287c73842c5871b159aff80 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 19 Dec 2022 13:29:50 +0100 Subject: [PATCH 14/14] updated supported magento version --- Test/Unit/Block/Adminhtml/Config/Support/TabTest.php | 4 ++-- etc/config.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php b/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php index 53ccae3..bde7ed6 100644 --- a/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php +++ b/Test/Unit/Block/Adminhtml/Config/Support/TabTest.php @@ -51,7 +51,7 @@ public function testGetSupportedMagentoVersions() 'moduleConfiguration' => $this->getConfigurationMock() ]); - $this->assertSame('2.3.7, 2.4.4', $instance->getSupportedMagentoVersions()); + $this->assertSame('2.3.7, 2.4.5-p1', $instance->getSupportedMagentoVersions()); } /**+ @@ -62,7 +62,7 @@ private function getConfigurationMock() $mock = $this->getFakeMock(ModuleConfiguration::class)->getMock(); $mockExpects = $mock->expects($this->once()); $mockExpects->method('getSupportedMagentoVersions'); - $mockExpects->willReturn('2.3.7, 2.4.4'); + $mockExpects->willReturn('2.3.7, 2.4.5-p1'); return $mock; } diff --git a/etc/config.xml b/etc/config.xml index 8a58f05..9910ee9 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -33,7 +33,7 @@ - 2.3.7, 2.4.4 + 2.3.7, 2.4.5-p1 0