-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Making optionalZipCountries JS code conditional #2996
Conversation
`js/varien/form.js` checks for existence of the variable, hence it's allowed to be undefined if empty. There is more on this. The block is inserted into every Magento page, which seems excessive. It's probably only used in the Cart but I haven't checked thoroughly so leaving it alone for now. Same for the admin.
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.
Why not, can you fix indent, use endif
in template, and change Mage::helper
with $this->helper
? (not yet tested)
There is also the same file in adminhtml.
I will never understand why templates are written in this horrible coding standard, lol. |
app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml
Outdated
Show resolved
Hide resolved
…l_zip_countries.phtml Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
@sreichel installed phpmd and phpcs: One of the rules is camelCase. Not against snake_case, but it is better to standardize on camelCase |
app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml
Outdated
Show resolved
Hide resolved
…l_zip_countries.phtml Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
good to go |
--------- Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
merged and 20ed |
js/varien/form.js
checks for existence of the variable, hence it's allowed to be undefined if empty.There is more on this. The block is inserted into every Magento page, which seems excessive. It's probably only used in the Cart but I haven't checked thoroughly so leaving it alone for now. Same for the admin.
Also
type="text/javascript"
is no longer necessary.