myparcelnl / prestashop

PrestaShop module to integrate with MyParcel NL and BE
https://developer.myparcel.nl/nl/documentatie/11.prestashop.html
10 stars 5 forks source link

Bug - pickup order label creation doesn't work #170

Closed mariuszsienkiewicz closed 1 year ago

mariuszsienkiewicz commented 2 years ago

Module version

v1.6.1

PrestaShop version

1.7.7.1

PHP version

7.3

What went wrong?

It's not possible to create an order label for pickup.

Reproduction steps

Any order label creation leads to this problem in our case.

Relevant log output

request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 1 passed to MyParcelNL\Sdk\src\Model\Consignment\AbstractConsignment::setPickupCountry() must be of the type string, null given, called in <path>/modules/myparcelnl/vendor/myparcelnl/sdk/src/Helper/Utils.php on line 26" at <path>/modules/myparcelnl/vendor/myparcelnl/sdk/src/Model/Consignment/HasPickupLocation.php line 151 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Type error: Argument 1 passed to MyParcelNL\\Sdk\\src\\Model\\Consignment\\AbstractConsignment::setPickupCountry() must be of the type string, null given, called in <path>/modules/myparcelnl/vendor/myparcelnl/sdk/src/Helper/Utils.php on line 26 at <path>/modules/myparcelnl/vendor/myparcelnl/sdk/src/Model/Consignment/HasPickupLocation.php:151)"} []

Additional context

When ConsigmentAdapter tries to setPickup, the pickup data doesn't contain the cc index in the array:

[pickup] => Array
        (
            [location_name] => <anonymized>
            [city] => <anonymized>
            [postal_code] => <anonymized>
            [street] => <anonymized>
            [number] => <anonymized>
            [number_suffix] => 
            [location_code] => <anonymized>
            [retail_network_id] => <anonymized>
        )
wthijmen commented 2 years ago

Hi @mariuszsienkiewicz,

We are currently investigating this bug, for now we can't reproduce the bug. Im running on the following versions:

Is it possible for you to provide us more information about the bug? I can see that all other values at your side are being set except the CC.

This information can also been shared to the IT-support department trough the following email: support@myparcel.nl

mariuszsienkiewicz commented 2 years ago

I have sent an email with more information.

EdieLemoine commented 1 year ago

The first beta version of the next version of our module is out now where this should not occur anymore.

Please read this issue for more information and how to report bugs in the new version, if you're interested in trying it out.