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

[BETA]: Additional street info is being doubled #267

Open PollyKant opened 1 month ago

PollyKant commented 1 month ago

Version check

MyParcelNL version

v4.0.0-beta.3

PrestaShop version

8.1.7

PHP version

8.1

What went wrong?

In myparcelnl/vendor/myparcelnl/pdk/src/Shipment/Request/PostShipmentsRequest.php informations included in second (optional) address fields (address2) are being doubled. Variable "street" is created by combining both address fields, and sent to MyParcelNL. Second address field is still being sent as "street_additional_info" despite the fact that it has already been included in previous data. As a result, if optional adress field is filled, adress sent to MyParcelNL end up having format "field1 field2 field2", and this wrong address is also being printed on labels.

Reproduction steps

  1. Create an account.
  2. Create an address, fill both required and optional address field.
  3. Make an order using myparcelnl delivery method.
  4. Log in to backoffice.
  5. Go to orders page.
  6. Export order created in step 3.
  7. Log in to https://account.myparcel.nl/ account.
  8. Go to Shipments -> Summary.
  9. See "Recipient" column for an order exported in step 6.

Relevant log output

No response

Additional context

No response