Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't select DPD pick up point in BO #97

Open
kinectpresta opened this issue Sep 17, 2024 · 10 comments
Open

Can't select DPD pick up point in BO #97

kinectpresta opened this issue Sep 17, 2024 · 10 comments

Comments

@kinectpresta
Copy link

Hey,

There is an issue for onepage checkout. When the DPD pickup machine is not selected manually - it doesnot appear in the BO near order. Gives an error: "Oops... looks like an unexpected error occurred. Call to a member function getPCode() on bool [Error 0]"

Would be nice to be able to at least select the pickup point in bo near order. Or that the pickup point would be assigned closest from postal code for example.

Regards,
Gustas

@kinectpresta
Copy link
Author

in [modules/dpdbaltics/src/Service/API/ShipmentApiService.php&line=110#line110)(line 110)

// Post code might be wrong in order adress, so we set terminal post code instead if ($shipmentData->isPudo()) { $parcel = $this->parcelShopService->getParcelShopByShopId($shipmentData->getSelectedPudoId()); $selectedParcel = is_array($parcel) ? reset($parcel) : $parcel; $postCode = $selectedParcel->getPCode(); $address->address1 = $selectedParcel->getStreet(); }

@justelis22
Copy link
Collaborator

Hi there,

I will forward the feedback to the team and we will check what could be done.

As soon as I have more details, I will let you know.

Best Regards,
Invertus Support team.

@kinectpresta
Copy link
Author

any news?

@justelis22
Copy link
Collaborator

Hi there @kinectpresta, thanks for waiting.

I will get back to you with an update before the end of this week.

Best Regards,
Invertus Support team.

@justelis22
Copy link
Collaborator

Hi there once again @kinectpresta!

We have started analyzing this issue, however, I am not able to prompt this error you added. To investigate this issue further, additional information would be needed.

Can you please let me know how the issue can be recreated? Which One-page checkout module are you using?

Please attach some screenshots or a video recording of the error, and error logs from the module logs tab.

Thanks!

Best Regards,
Invertus Support team.

@kinectpresta
Copy link
Author

Hey,

Thanks for responding. We use One page checkout by st-themes. The problem only occurs if the parcel machine is not selected - it allows to place an order without selecting one.

In the BO then the parcel doesnot appear and there is no option to select any parcel. In this scenario we put a city Rusnė, this city does not have a parcel machine so it was left blank. https://gyazo.com/a7f423e54aec70403aa4d8b25b4171c8

Preferable solution would be that the module would select the closest pickup machine based on zip code (also would be nice to select the parcel machine in the BO).

OR give a message in the checkout that the user needs to select the pickup point and only then allow to place an order.

Another thing not so related is ability to generate a new label because once the label is generated it does not allow to delete / change the parcel machine or any contact info.

Regards,
Kinect

@justelis22
Copy link
Collaborator

Hi @kinectpresta,
Thank you for a detailed explanation.

I have tested the DPD module with the 3 OPC modules that the DPD Baltics module is compatible with (The Checkout, One Page Checkout PS, and SuperCheckout).
The module works as you described, it either pre-fills the fields with the city that is entered in the address fields or does not allow the user to proceed until that is done:
image

The DPD Baltics module is not compatible with the module you are using, which is why you are running into these issues.

I would suggest making the needed changes individually for your shop or using one of the compatible OPC modules.

If you have any questions, please let me know!

Best Regards,
Invertus Support team.

@kinectpresta
Copy link
Author

Thanks for your response. Sounds great, how can this modification be done? Do you have a documentation or a guide to point in the right direction?

Thanks in advance :)

@justelis22
Copy link
Collaborator

Hi there @kinectpresta,
Thanks for waiting!

There is no documentation; these changes require custom development to adapt the OPC module to work with DPD carriers.

If you have any questions, please let me know!

Best Regards,
Invertus Support team.

@kinectpresta
Copy link
Author

Hey,

Writing about a possible problem withing this subject. When the city is selected automatically from the address - it is great. However, then the pick-up point selected is the first one on the list and NOT the closest via address.

Is there a way to make it not select the address or select the closest. Because we get a lot of orders for example from Vilnius with selected pickup point PC PUPA 001.

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

No branches or pull requests

2 participants