experius / Magento-2-Module-Experius-Postcode-NL

PostcodeNl Api Magento 2 Module. Available At Packagist
https://packagist.org/search/?q=experius
Open Software License 3.0
29 stars 31 forks source link

Preview with housenumber addition seems to be broken with update. #58

Closed ericclaeren closed 3 years ago

ericclaeren commented 3 years ago

Hi, It seems the formatAddress() breaks the preview functionality and setting the correct addition value.

https://github.com/experius/Magento-2-Module-Experius-Postcode-NL/compare/1.3.4...1.7.0#diff-beb6d976e0f41c9953ccbacb72f20d30419a2d8208bb335920a4bfa1dc63bc98R559

This line:

var houseNoAdd = overrideData.housenumber_addition || formData.experius_postcode_housenumber_addition_manual;

Only seems to set the addition from the manual selection. This probably should be:

var houseNoAdd = overrideData.housenumber_addition || formData.experius_postcode_housenumber_addition || formData.experius_postcode_housenumber_addition_manual;
rubenexp commented 3 years ago

Hi @barryvdh @ericclaeren Your PR will cause the manual field to be set even if its hidden, i've added my own PR with the correct fix.

rubenexp commented 3 years ago

Fixed in release 1.8.2, PR #60

ericclaeren commented 3 years ago

Great! Thanks!