Closed template-provider closed 3 years ago
Hello @template-provider , I tried to duplicate your issue, but I don't see it. For me, things look ok.
What I did is this:
No switching of the country was necessary for me. As soon as the DHL block was visible, the button "Find Parcel Station" was always in it.
Tested on M2.3.5 with DHL module 1.2.0
I see a call to "estimate-shipping-methods" in the network tab of the browser dev-tools when I change the city or something.
Hi, we are using Magento 2.4.1 with PHP 7.4.
like the first screenshot from my comment before I wasnt actually aware, that the dhl block should not be shown at start
I can only guess that the wrong country is used to load service data although "DE" is selected in UI. To validate, please
dhl_shipping_data_storage
entry from local storagedhl/checkout-data/get
Hi, the payload is:
{"countryId":"DE","postalCode":"64331"}
but the parcel finder is not active. You can check it yourself directly on our website: https://shop.icletta.com
Another thing is strange. I can change the country to BR (get call is triggered) and change back to DE (no call is triggered ... caching of the response before?), but after changing to DE the parcel finder is active (as mentioned in comments above)
Thank you for the link to the website, that was helpful.
It appears that you have set a default postal code for tax calculation in checkout.
Stores → Configuration → Sales → Tax → Default Tax Destination Calculation → Default Post Code
When you clear that field (and config cache, local storage entry), then everything should work as designed (service box loads after address data was entered). In my understanding, the default postal code is not necessary for tax calculation in Germany.
We may further investigate why the location finder is not displayed with default postal code configured, but the workaround should get you going for now. Please let us know about the result, thanks!
Hi, thx .... this change seems to work, now the dhl service box is loaded after any address data was entered. Should I close the issue or keep it open?
We may further investigate why the location finder is not displayed with default postal code configured, but the workaround should get you going for now. Please let us know about the result, thanks!
I am about to create a ticket in our internal issue tracker. As the original issue is worked around via store configuration, I close it here.
Internal ref: DHLGW-1002
Caused by #5
We have a problem with initial state of the parcel finder. If we go to checkout, we have selected a "default country "Deutschland". The block with the shipping options is loaded but WITHOUT the parcel finder. This problem may be the same regarding the issue before netresearch/dhl-shipping-m2#12
I think the initial state/event is missing. The event for showing/reloading the block should be triggered after the page is loaded and not only by changes from the country. Greetings Jan