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 12 forks source link

Prevent a customer using postbus #91

Closed JelleGe closed 2 months ago

JelleGe commented 8 months ago

Is there any way to prevent a customer using a so called "postbus" in The Netherlands?

JerrySmidt commented 8 months ago

It could probably be done by adding mixins for additional validation. In the mixin, check for a pobox value. With the international API, that's the isPoBox property (https://developer.postcode.eu/documentation/international/country-details/NLD), for the Dutch postcode API, it's the addressType property with value "PO box" (https://developer.postcode.eu/documentation/nl/v1/Address/viewByPostcode).

However, we're planning to add this feature in a future release, likely the next one.

JerrySmidt commented 2 months ago

Now available in 3.3.0. See https://github.com/postcode-nl/PostcodeNl_Api_Magento2/commit/066dad59b11c7ce00cd9a7a98aab1e384e04734d