postcode-nl / PostcodeNl_Api_Magento2

A Magento 2 plugin that implements the Postcode.nl international address API
https://developer.postcode.eu/documentation/
BSD 2-Clause "Simplified" License
10 stars 13 forks source link

House number not added to street values #98

Open MartinL1983 opened 1 week ago

MartinL1983 commented 1 week ago

Hi,

We are using the NL postcode check and we have noticed that the house number is not being added to the street address part. In our setup we have need customers to add street + house number in the same field (shipping-address-fieldset.street.0)

The issue seems to be on lines 65 to 71 in postcode-nl/api-magento2-module/view/frontend/web/js/form/components/checkout/address-autofill-nl.js

The same issue could also be with international addresses, but as we don't use that we are unable to confirm this.

JerrySmidt commented 1 week ago

Hello,

If Magento is configured to use one street line, then our module should already put street + house number + house number addition in one field.

The number of street lines can be configured at Stores -> Configuration -> Customer Configuration -> Name and Address Options -> Number of Lines in a Street Address.

MartinL1983 commented 1 week ago

@JerrySmidt

Thank you for your reply. But this is an incorrect approach to this issue as one, like in the Netherlands, can have two address fields. One for street + house number and a second for additional information. Having two fields does not automatically mean the house number should be added to the second field.

JerrySmidt commented 1 week ago

Thanks Martin, that makes sense. This should probably be the default way to fill in the street values. I'll see if I can fix this in the next version.