Comments (6)
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.
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.
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.
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.
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.
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)
- Shipping Label Automation send mail HOT 10
- Doesn't print "supplement" part of street address HOT 2
- Feature request: Auslieferungsnachweis HOT 4
- Shipping labels in Magento 2.4.4 do not show up in Magento when created by cronjob HOT 4
- SQL error when querying customer orders with GraphQL HOT 2
- Weird CSS errors HOT 4
- CN22 HOT 3
- Error while enable modules HOT 1
- [Future] Hyva Combat Module / Checkout HOT 2
- PSR Log ^1.1|^2|^3 HOT 3
- Remove references to Zend_Measure_Weight HOT 3
- [Future] Editable Delivery Location
- Class not found errors on Magento 2.4.6 HOT 1
- DHL module breaks 3rd party module after Update to newest version HOT 1
- Manual insertion of a tracking number HOT 9
- uninstallation of dhl/shipping-m2 HOT 11
- Track this shipment link
- DHL Module with MSI Enabled HOT 5
- Incompatibility with Magento 2.4.7 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dhl-shipping-m2.