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

Province is wrong #92

Open Naberdz opened 8 months ago

Naberdz commented 8 months ago

When we choose country as belgium and set following: 2627, Schelle Frans Cretenlaan 35 in the field at checkout we have Province/Region as Oost-Vlaanderen instead of Antwerpen.

How can this be fixed ?

response from api :

[
    {
        "language": "nl-BE",
        "address": {
            "country": "Belgium",
            "locality": "Schelle",
            "street": "Frans Cretenlaan",
            "postcode": "2627",
            "building": "35",
            "buildingNumber": 35,
            "buildingNumberAddition": null
        },
        "mailLines": [
            "Frans Cretenlaan 35",
            "2627 Schelle"
        ],
        "location": {
            "latitude": 51.126624,
            "longitude": 4.341681,
            "precision": "Address"
        },
        "isPoBox": false,
        "country": {
            "name": "Belgium",
            "iso3Code": "BEL"
        },
        "details": {
            "belRegion": {
                "nisCode": 2000,
                "primaryName": "Vlaanderen",
                "nlName": "Vlaanderen",
                "frName": "Flandre",
                "deName": "Flandern"
            },
            "belProvince": {
                "nisCode": 10000,
                "primaryName": "Antwerpen",
                "nlName": "Antwerpen",
                "frName": "Anvers",
                "deName": "Antwerpen"
            },
            "belDistrict": {
                "nisCode": 11000,
                "primaryName": "Antwerpen",
                "nlName": "Antwerpen",
                "frName": "Anvers",
                "deName": "Antwerpen"
            },
            "belMunicipality": {
                "nisCode": 11038,
                "primaryName": "Schelle",
                "nlName": "Schelle",
                "frName": "Schelle",
                "deName": "Schelle",
                "officialLanguages": [
                    "nl-BE"
                ],
                "facilityLanguages": []
            },
            "belMunicipalSection": {
                "primaryName": "Schelle",
                "nlName": "Schelle",
                "frName": null,
                "deName": null
            },
            "belStreet": {
                "primaryName": "Frans Cretenlaan",
                "nlName": "Frans Cretenlaan",
                "frName": null,
                "deName": null
            },
            "belBuilding": {
                "number": 35,
                "bisNumber": null,
                "boxNumber": null,
                "validated": true,
                "language": "nl-BE"
            }
        }
    }
]
JerrySmidt commented 8 months ago

Hi Naberdz,

Thanks for your feedback. The module doesn't currently set the province with the international autocomplete. We'll look into adding this functionality in a future version.