-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Add/Remove mark when region/zip is required #2149
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
Component: Adminhtml
Relates to Mage_Adminhtml
Component: Customer
Relates to Mage_Customer
Component: Directory
Relates to Mage_Directory
Component: Sales
Relates to Mage_Sales
JavaScript
Relates to js/*
Template : admin
Relates to admin template
labels
May 25, 2022
fballiano
previously approved these changes
May 31, 2022
fballiano
approved these changes
Jun 7, 2022
kiatng
approved these changes
Sep 27, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested & worked.
There is a little bug, on admin login page. diff --git a/js/mage/adminhtml/form.js b/js/mage/adminhtml/form.js
@@ -609,4 +609,6 @@ function setPostcodeOptional(zipElement, country) {
}
}
-varienGlobalEvents.attachEventHandler("address_country_changed", onAddressCountryChanged);
+if (typeof varienGlobalEvents != 'undefined') {
+ varienGlobalEvents.attachEventHandler("address_country_changed", onAddressCountryChanged);
+} |
@luigifab created a PR for that |
fballiano
added a commit
that referenced
this pull request
Sep 29, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component: Adminhtml
Relates to Mage_Adminhtml
Component: Customer
Relates to Mage_Customer
Component: Directory
Relates to Mage_Directory
Component: Sales
Relates to Mage_Sales
JavaScript
Relates to js/*
Template : admin
Relates to admin template
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fix display and validation when region/zip are required, for Customers addresses in backend.
Manual testing scenarios
In System / Configuration / General, set Allow Countries to USA, France, Ireland ; and remove France for State is required for.
Go to Customers, open any customer or add a new customer, then go to Addresses tab and add a new address.
Go to Sales, open any order, and try to edit Shipping or Billing address.
If you set country to usa, if you try to save the customer:
That's the truth.
Now if you set country to Ireland, if you try to save the customer:
That's wrong.
Now if you set country to France, if you try to save the customer:
That's the truth.
Apply the PR and try again.
Contribution checklist