DPDBaltics / PrestaShop-1.7

Official DPD plugin for PrestaShop 1.7
6 stars 3 forks source link

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

Open kinectpresta opened 2 months ago

kinectpresta commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 1 month ago

any news?

justelis22 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 3 weeks ago

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 commented 1 week ago

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.