GithubHelp home page GithubHelp logo

Comments (6)

ngolatka avatar ngolatka commented on July 4, 2024 1

Well, not really, because then the data would still be incorrect for all the other processes inside Magento.

The better approach would be to trim immediately after checkout, so that everything has clean(er) data to work with.

from dhl-shipping-m2.

ngolatka avatar ngolatka commented on July 4, 2024

Hello @in-session
Please inspect the request in the log. I suspect there might simply be a white-space after the ZIP code.

This sometimes happens when people use mobile devices. The "keyboard" might automatically put a white-space after the input when using the autocomplete feature.

from dhl-shipping-m2.

in-session avatar in-session commented on July 4, 2024

Hi Normen,

You are right, I had already checked the database but found a whitespace in the sales_order_address.
I guess it wouldn`t be bad to apply a trim here before sending the data to the API?

Greetings Christoph

from dhl-shipping-m2.

in-session avatar in-session commented on July 4, 2024

Ok thanks I will have another look at the frontend and adjust the inputs via script so that the problem is solved before sending.

from dhl-shipping-m2.

in-session avatar in-session commented on July 4, 2024

Sorry but I have to open this again, it seems that there is no trim from the core. This means that basically whitespaces are inserted in the DB. Therefore, you should indeed make a trim for the address data in the API query to avoid such errors in the future. Of course, the data will still be in the database, but at least you can avoid the API error.

from dhl-shipping-m2.

ngolatka avatar ngolatka commented on July 4, 2024

That's correct, Magento does not trim the data out-of-the-box. You need to implement that yourself.

We don't really want to do this in our DHL module, because as I explained, it would not solve the underlying issue, and actually mask a problem. Better fix the problem where it's coming from.

Also, it is not the responsibility of our DHL Shipping module to correct invalid user input. That's the job of the Deutsche Post Direkt Autocomplete module, or even the Addressfactory module.

from dhl-shipping-m2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.