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

[BUG] PostNL shippingmethods custom not working when create shipment in backend #384

Open
JoostWan opened this issue May 12, 2024 · 3 comments

Comments

@JoostWan
Copy link

JoostWan commented May 12, 2024

To Reproduce
Steps to reproduce the behavior:

  1. Set a custom shipping method in the backend option Path: tig_postnl/extra_settings_advanced/allowed_shipping_methods
  2. Place a backend order with the selected custom shipping method.
  3. Create a shipment for the placed order with the custom shipping method.

Now there are no PostNL options available.

Screenshot 2024-05-12 at 22 25 14

In this file is there a check that returns false
https://github.com/postnl/postnl-magento2/blob/master/view/adminhtml/templates/shipment/create/options.phtml#L6

This function is checked from the options.phtml and returns false
https://github.com/postnl/postnl-magento2/blob/master/Block/Adminhtml/Shipment/OptionsAbstract.php#L92

When you change this for testing to return true the shipping options are visible. But on the next page where you can download the labels there is again a check on shipping method. https://github.com/postnl/postnl-magento2/blob/master/Block/Adminhtml/Shipment/View.php#L62

  • Magento version: 2.4.6
  • PHP version: 8.2
  • TIG PostNL version: 1.14.0
@JorisPostNL
Copy link

JorisPostNL commented May 21, 2024

Hi @JoostWan,

Thank you for bringing this to our attention! The issue in question is caused by an incompatibility between our plug-in and shipping methods which are not shipping method "PostNL". For this reason we included Flat, Table and Matrix rates in our shipping method, so there would likely be no need for other methods.
This leads us to the question what the purpose of your custom shipping method is exactly, could you provide us with some context in this regard? Perhaps there are better/quicker changes we can develop than this which would achieve the same goal. Could you advise why a custom shipping method is preferred in your case?

Kind regards
Joris

@JoostWan
Copy link
Author

Hi @JorisPostNL

A custom shipping method has been created so that the customer can create an order via the backend with free shipping costs. As far as I know, this is not possible with table rates, where you can specifically indicate this for an order via the backend. Via the frontend, however, it must be a certain amount.

@JorisPostNL
Copy link

Hi @JoostWan

Thank you for elaborating on the issue. I have tested it and agree that this could be a useful change to our plug-in. We will discuss this further internally to decide if and when we will place this on our roadmap. Thanks again for providing valuable feedback and suggestions!

Kind regards
Joris

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

No branches or pull requests

2 participants