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

The mandatory City field (plaatsnaam) stays hidden and empty during the whole checkout process and blocks sales #58

Open
michel334 opened this issue Jul 10, 2024 · 0 comments

Comments

@michel334
Copy link

We get regular complaints from webshop customers that they are unable to complete the checkout process. They complain about being unable to fill in the City (plaatsnaam) field. I can also see this in the Magento logfiles.

Logmessage:
main.CRITICAL: Placing an order with quote_id XXX is failed: Gelieve de verzendgegevens van dit adres te controleren. "city" is verplicht. Voer in en probeer het nogmaals.

I am able to reproduce the problem, see screenshots. We use the standard two step checkout process.

There was an earlier bugreport with almost the same problem:
#50

To Reproduce
Steps to reproduce the behavior:

screenshot 1: Fill in the zipcode with a trailing space. The trailing space is just an example of the process. I suspect that a browsers autofill can lead to the same problem. In the example i use an incorrect zipcode, but it works the same for correct zipcodes.

A default Magento message appears about the zipcode (with a trailing space). The message suggests its ok to continue the checkout process, but the City (plaatsnaam) field is hidden (by the plugin) and empty. This is a mandatory field, but because it is hidden the customer can continue the checkout process with missing required City.

screenshot 2: The happy customer continues to step 2. If you look carefully you can see the City field is empty. No warnings.

screenshot 3: The customer wants to give us money and presses the Order button. Magento now notices the mandatory field City is empty and blocks the order with an error message (City is required.)

screenshot 4: The confused customer goes back to the first step, but the City field is still hidden and empty. He actually sees his valid zipcode (with the trailing space or autofilled). Most customers now abort or call support.

Expected result
Customers being able to pay. Don't block sales. The customer must be able to fill in the City field even with wrong data / autofill etc. Or allways calculate the City field by removing trailing spaces. The trailing space is just an example. I suspect autofill can lead to the same problem if the autofill fills the wrong fields. This triggers a Magento check and never triggers this plugins zipcode check, so the City field stays empty and hidden during checkout.

It should never be possible to go to step 2 of the checkout with missing mandatory City field.

Actual result
The required hidden City field stays empty and hidden all the time. The Customer cannot fill in the required City field, cannot pay and leaves.

Workaround
Some smart customers (developers?) keep fiddling with the fields until the plugin gets triggered to do the zipcode check and unhide the City field.

Screenshots
4 screenshots added

Magento version: 2.4.4-p9
PHP version: 8.1.24
tig/postcode-magento2 module 1.7.0

stap1-met-spatie

stap2-zonder-verplichte-stad

stap3-city-foutmelding-na-klik-afrekenen

stap4-terug-naar-1estap-afrekenen-nog-steeds-geen-city-veld

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

1 participant