magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.48k stars 9.29k forks source link

Postcode / Zipcode in checkout form already validated on page load #18630

Closed dverkade closed 5 years ago

dverkade commented 5 years ago

Preconditions

  1. Magento 2.2.6

Related issues

There are several bugs about this, but they are all closed and it's mentioned that this has been resolved in Magento 2.2.X, but unfortunately it's not in the latest version, so opening a new bug report for this issue.

  1. magento/magento2#7724
  2. magento/magento2#8115

Steps to reproduce (*)

  1. Add products to cart
  2. Checkout as a guest
  3. The tax/defaults/postcode config value in core_config_data is NULL

Expected result (*)

  1. Postcode / Zipcode field should be empty and should not be validated
  2. No error message should be shown that the field is required

Actual result (*)

  1. Postcode / Zipcode field has error message that the field is required

image

magento-engcom-team commented 5 years ago

Hi @dverkade. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop). For more details, please, review the Magento Contributor Assistant documentation.

@dverkade do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

magento-engcom-team commented 5 years ago

Hi @engcom-backlog-nazar. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

ghost commented 5 years ago

HI @dverkade thank you for your report, i'm confusing with your issue, why zip code must be not required ? after you chose tax/default/postcode ? because this field is required -> Settings can be found in: Admin Panel > Stores > Settings > Configuration > General > General > Country options > Zip/Postal Code is Optional for . So if you chose all you dont have this error validation. And why taxes can remove validation from aip postal code ?

ghost commented 5 years ago

@dverkade Ok, i'm understand that if page load, then this validate the zip code filed, but in my case i have no validation, see attachments. zip

dverkade commented 5 years ago

@engcom-backlog-nazar if I look at the screenshots you are using Magento 2.3 development. As noted in the issue description we have this issue with Magento 2.2.6.

ghost commented 5 years ago

@dverkade ok, but you created the PR https://github.com/magento/magento2/pull/18633 to 2.3-develop so this issue must be in 2.3 ?

ghost commented 5 years ago

@dverkade the same on 2.2-develop and 2.2.6 instance, i'm do exactly what you mentioned on steps to reproduce.

ghost commented 5 years ago

@dverkade Can you reproduce this on vanilla instance ?

ghost commented 5 years ago

@dverkade, we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.

ghost commented 5 years ago

I'm able to reproduced this issue by following steps on 2.2-develop and 2.3-develop:

  1. Use system value to : Stores > Settings > Configuration > General > General > Country options > Zip/Postal Code is Optional for
  2. Add products to cart as guest
  3. Proceed to checkout
magento-engcom-team commented 5 years ago

@engcom-backlog-andrii Thank you for verifying the issue.

Unfortunately, not enough information was provided to created internal ticket. Please consider adding the following:

Once all required information is added, please add label "Issue: Confirmed" again. Thanks!

magento-engcom-team commented 5 years ago

@engcom-backlog-andrii Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-96736, MAGETWO-96737 were created

PathToLife commented 5 years ago

Can also reproduce..

Still exists in 2.3.0. Just have to set a postcode in "Default Tax Destination Calculation"

Which is set here: http://Base_url/admin/admin/system_config/edit/section/tax/ postcode set here

Use Xdebug in any active shipping module on calling RateRequest->getDestPostcode(). We observe that:

Magento\Quote\Model\Quote\Address\RateRequest->$_data['dest_postcode'] = Default Tax Destination Calculation
magento-engcom-team commented 5 years ago

Hi @dverkade. Thank you for your report. The issue has been fixed in magento/magento2#18633 by @dverkade in 2.3-develop branch Related commit(s):

The fix will be available with the upcoming 2.3.2 release.