Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module uses customer information from account rather than from address #266

Open
1 task done
PollyKant opened this issue Jul 22, 2024 · 0 comments · May be fixed by #277
Open
1 task done

Module uses customer information from account rather than from address #266

PollyKant opened this issue Jul 22, 2024 · 0 comments · May be fixed by #277
Labels
bug Something isn't working

Comments

@PollyKant
Copy link

Version check

  • My version of the plugin is v4.0.0-beta.0 or above.

MyParcelNL version

v4.0.0-beta.3

PrestaShop version

8.1.7

PHP version

8.1

What went wrong?

When sending data to MyParcelNL, in myparcelnl/src/Pdk/Base/Adapter/PsAddressAdapter.php "person" is created twice, in createFromAddress() from an address, and in createFromCustomer() from a customer account. Both those methods are combined to a single result in fromOrder() method, and "person" information from account is being used.
In a situations when customers account have different personal information than adress this means that wrong data is being send, and later wrong labels are being printed.

Reproduction steps

  1. Create an account.
  2. Create an address with different name and last name.
  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

@PollyKant PollyKant added the pdk This is a pdk related issue label Jul 22, 2024
@EdieLemoine EdieLemoine changed the title [BETA]: Module uses customer information from account rather than from address Module uses customer information from account rather than from address Oct 16, 2024
@EdieLemoine EdieLemoine linked a pull request Oct 16, 2024 that will close this issue
@EdieLemoine EdieLemoine added bug Something isn't working and removed pdk This is a pdk related issue labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants