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] Missing option "Ophalen" when logged in #292

Closed GerritTickles closed 1 year ago

GerritTickles commented 2 years ago

When a customer is logged in and fills in an address in the checkout the option "Ophalen" is not available in the checkout. The network request: /postnl/deliveryoptions/locations/ returns a status Code 500. In the payload the address[housenumber] is empty. Content of error log:

{"0":"Warning: count(): Parameter must be an array or an object that implements Countable in /vendor\/tig\/postnl-magento2\/Helper\/AddressEnhancer.php on line 180","1":"#1 count() 

To Reproduce Steps to reproduce the behavior:

  1. Login with customer account without default billing or shipping address.
  2. Go to the checkout and fill in customer and address information.
  3. Select PostNL as shipping method.

Expected result Have to option to choose "Ophalen" in the PostNL shipping options.

Actual result Only "Bezorging" is available.

Workaround

Please complete the following information

Magento version: Magento 2.4.3-p1 PHP version: 7.3.31 TIG PostNL version: 1.10.1

Screenshot 2022-03-02 at 14 25 04

tig-jeffreybranderhorst commented 2 years ago

Hi @GerritTickles,

Thank you for submitting this bug, with the steps to reproduce included. Because of this, we were able to reproduce it. I will create a backlog issue for this bug and together with PostNL we will make a plan to fix this issue.

Have a great day, Jeffrey

tig-vincentthart commented 1 year ago

Hi @GerritTickles

We have just retested this on the latest version v1.12.6 of the plugin and the issue seems to be resolved. If you still run into this issue, could you please send an email to digitaleklantsupport@postnl.nl. So they can further assits you with this issue.

Have a nice day!

Vincent