tig-nl / gls-magento2

Integrate GLS shipping services into Magento 2. Add GLS shipping and parcelshops to your checkout. Create your labels with Track and Trace functionality from the Magento backend.
5 stars 8 forks source link

[BUG] Languages not supported? #33

Open vandijkstef opened 2 years ago

vandijkstef commented 2 years ago

To Reproduce Steps to reproduce the behavior:

  1. Setup a multistore with various languages, install the plugin etc. Make sure it's all working fine IN DUTCH
  2. Switch the store view to another language (tested fr_FR and sv_SE) and try to order

Expected result Having deliveryOptions available in the correct language

Actual result No deliveryOptions available. The 'gls/deliveryoptions/services?postcode=XXX&country=XXX&_=XXXX' route returns '[]' (empty array). When calling that same url through the main/dutch store it DOES give the proper results

Workaround TIG/GLS/Service/DeliveryOptions/Services.php:74 $langCode -> Change into 'NL' (hardcoded language)

I assume GLS only supports a limited amount of languages OR the language code is passed on wrongly. In either case I'd love to have a fallback to English

Please complete the following information

tig-jeffreybranderhorst commented 2 years ago

Hi @vandijkstef,

Because of this, you cannot place the order because it is expecting delivery options while the delivery options are not available, am I correct? I will also internally talk about this issue if the GLS works outside NL.

Have a great day, Jeffrey

vandijkstef commented 2 years ago

Hi @tig-jeffreybranderhorst ,

Indeed the order isn't accepted.

The 'storepickup' options are available (if chosen a destination in NL), but the 'default' delivery isn't.