postnl / postnl-magento2

This is the official Magento 2 extension for the logistics company PostNL. Add shipping options and parcelshops to your checkout. Create labels with track and trace functionality from the backend.
58 stars 60 forks source link

[BUG] Incorrect date option is selected for delivery after reloading the checkout page #389

Closed YachYaroslav closed 1 month ago

YachYaroslav commented 2 months ago

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Admin' -> 'Stores' -> 'Configuration' -> 'Sales' -> 'PostNL'
  2. Open 'Delivery' -> 'Delivery Days' config section and set 'Maximum number of delivery days' to 14 (instead of 7 default).
  3. Save config and clear the caches.
  4. Go to frontend checkout page.
  5. Fill the address of the Netherlands (e.g. Street Address - Weena XXXX, City - Rotterdam, Zip/Postal Code - 3013AL).
  6. Click on 'PostNL' shipping method and select Monday (the earliest one / top one).
  7. Refresh the checkout page (F5).
  8. Scroll down to 'PostNL' shipping method.

Expected result The same date option is selected (Monday 12-08-2024).

Actual result The week after date option is selected (Monday 19-08-2024).

Workaround None

Screenshots

Before reload (Monday 12-08-2024 is selected):

monday-selected-before-reload

After reload (incorrect Monday 19-08-2024 is selected):

incorrect-monday-selected-after-reload


Also the same issue is reproducible on a highly customized Magento (with Swissup_Firecheckout and many custom modules):

JorisPostNL commented 1 month ago

Hi @YachYaroslav, thank you for reporting this issue.

Unfortunately the issue you mention is caused by the way the Magento2 framework itselfs handles the check-out data, and not by our plug-in. We have investigated this issue in the past and came to the conclusion we could not fix this issue without working on Magento2 itself rather than our plug-in. This means that unfortunately there is nothing we can do about this problem at this moment.

Note: since all three issues you posted concern the same root cause I will copy and paste this answer in all three tickets, so it's clear for other visitors what the outcome of your report was.

Kind regards Joris - PostNL