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

Postcode is a required field in admin address form, but is not checked in country settings. #29625

Open
2 tasks done
sergioaraos opened this issue Sep 13, 2022 · 2 comments
Open
2 tasks done
Labels
1.7.8.7 Affects versions Addresses Label: Which BO under menu is concerned BO Category: Back Office Bug Type: Bug Countries Label: Which BO under menu is concerned Major Severity: major bug > https://build.prestashop.com/news/severity-classification Needs Specs Status: issue needs to be specified PR available Solution: issue is being addressed Verified The issue has been reproduced

Comments

@sergioaraos
Copy link

sergioaraos commented Sep 13, 2022

Prerequisites

Describe the bug and add screenshots

If I try to add a new address for a customer (existing or new), the form ask me for a Zip/Postal code, but the country have this option unchecked. This was the previous behavior after upgrade from 1.7.7.1 to 1.7.8.7

Form with Zip/postal code required.
screencshot of BO's form
image

Country has unchecked this option.
image

Expected behavior

Form should allow leave postcode empty.

Steps to reproduce

  1. Uncheck Zip/Postal Code from country
  2. Try to add a new address for a customer.
  3. Fill form without postcode in the Back Office.
  4. Submit the form
  5. Postcode is required.

PrestaShop version(s) where the bug happened

1.7.8.7

PHP version(s) where the bug happened

7.4

If your bug is related to a module, specify its name and its version

No response

@sergioaraos sergioaraos added Bug Type: Bug New New issue not yet processed by QA labels Sep 13, 2022
@florine2623
Copy link
Contributor

Hello @sergioaraos ,

I have reproduced your issue in PS 1.7.8.7, 8.0.x and develop. It is a regression, in PS 1.7.7.8 it was OK. I'll add this to the backlog so it can be fixed.

In Customer address:
Screenshot 2022-09-13 at 18 34 33

In Location > Countries:
Screenshot 2022-09-13 at 18 34 51

Might be the same fix as #20321 but for postcode.

Please be aware that some issues might take a very long time to be resolved. If this one is important to you and you cannot wait for it to be fixed on the project’s own time, we strongly suggest you consider contacting a professional to help you.

If you fix the issue on your end, please contribute it back to the project. Remember that the more people contribute, the better PrestaShop becomes for everyone.

Thank you

@florine2623 florine2623 added Major Severity: major bug > https://build.prestashop.com/news/severity-classification BO Category: Back Office Needs Specs Status: issue needs to be specified Addresses Label: Which BO under menu is concerned Countries Label: Which BO under menu is concerned Verified The issue has been reproduced Regression Type: regression 1.7.8.7 Affects versions and removed New New issue not yet processed by QA labels Sep 13, 2022
@panariga panariga mentioned this issue Sep 16, 2022
@prestonBot prestonBot added the PR available Solution: issue is being addressed label Sep 16, 2022
@MatShir MatShir added this to Not Ready in PrestaShop 1.7.8.x via automation Sep 19, 2022
@prestashop-issue-bot prestashop-issue-bot bot moved this from Not Ready to Ready in PrestaShop 1.7.8.x Sep 19, 2022
@MatShir MatShir removed this from Ready in PrestaShop 1.7.8.x Oct 28, 2022
@MatShir MatShir removed the Regression Type: regression label Oct 28, 2022
@Hlavtox
Copy link
Contributor

Hlavtox commented Jul 14, 2023

What is missing is the HTML form management, the validation on PHP side works correctly.

There is already some javascript fetching state list by AJAX after changing country.
We could fetch if the postcode is needed or not and toggle the "required" property of the field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.8.7 Affects versions Addresses Label: Which BO under menu is concerned BO Category: Back Office Bug Type: Bug Countries Label: Which BO under menu is concerned Major Severity: major bug > https://build.prestashop.com/news/severity-classification Needs Specs Status: issue needs to be specified PR available Solution: issue is being addressed Verified The issue has been reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants