Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

[BUG] ShopDeliveryService create label breaks with new setting GLS mass-actions for non GLS orders? #32

Open
SolsWebdesign opened this issue Feb 4, 2022 · 1 comment

Comments

@SolsWebdesign
Copy link

Customer updated to latest GLS and suddenly packages were returned. Turns out that the packages being returned were returned from Parcel shops. A little investigation showed that the labels were incorrect, they should contain "ShopDeliveryService" and a GLS code for the shop of choice. Quite some searching and adding of logging it turns out that in the TIG\GLS\Service\Label\Create class the mapLabelData function ends up in the fallback and then is set to "DefaultGLSOptions":
$deliveryOption = $this->getDefaultGLSOptions($shipment);

It took quite a bit of searching before we ended up with one setting that caused this: GLS mass-actions for non GLS orders -> Yes

I have no clue what that setting is supposed to do but I'm pretty sure it should not mess up ParcelShop deliveries. Now this is a multi store Magento so it could be that is has something to do with the bit of previous code (storeId) but I didn't investigate that any further.

Steps to reproduce the behavior:

  1. Go to 'Magento2.4.x multi store' -> Stores -> Configurations -> Sales -> GLS -> GLS mass-actions for non GLS orders -> Yes
  2. Go to frontend of multi store, throw stuff in cart go to checkout and choose GLS -> Parcel shop (Pakket shop), choose one and place order
  3. Go to backend, ship order and press create Label

Expected result
Label should contain "ShopDeliveryService" and a GLS code for the shop. As well as something saying "will be collected by..."
image

Actual result
Label looks suspiciously empty, seems that the Parcelshop address is being used as the actual person address instead of the Parcel shop being a place to collect it. As a consequence the packages are being returned to sender.
image

Workaround
Do not use the GLS setting "GLS mass-actions for non GLS orders" in (multi store?) magento shop if you want to use the Parcel shop delivery options

Screenshots
If applicable, add screenshots to help explain your problem.

** Please complete the following information**

  • Magento version: Magento 2.4.3
  • PHP version: 7.4.25
  • TIG GLS version: latest (1.4.0)
@tig-jeffreybranderhorst
Copy link

Hey @SolsWebdesign,

Thank you for submitting this! I just tested this on our test site with your steps and was able to reproduce the issue when GLS mass-actions for non GLS orders is on, With it off we get the right label. I'm going to place this on the backlog, and we will investigate this further and make en fix for future release.

Thank you for submitting this issue with the steps to reproduce it!

Have a great day,
Jeffrey

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants