From 74458fcf087affb601a94a3e6112166ada5041e8 Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Wed, 25 Jan 2023 10:23:29 +0100 Subject: [PATCH 01/10] Making optionalZipCountries JS code conditional `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. --- .../directory/js/optional_zip_countries.phtml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index e53e5a15220..155f86f4e9d 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -26,8 +26,13 @@ * @see Mage_Core_Block_Template */ ?> - +helper('directory')->getCountriesWithOptionalZip(false); +if(!empty($optional_zip_countries)) { + ?> + + From 404c2149281f873d0d90d420682a4d7034609ae9 Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Tue, 7 Feb 2023 09:54:31 +0100 Subject: [PATCH 02/10] Update optional_zip_countries.phtml --- .../template/directory/js/optional_zip_countries.phtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index 155f86f4e9d..97839637ef6 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -28,11 +28,11 @@ ?> helper('directory')->getCountriesWithOptionalZip(false); -if(!empty($optional_zip_countries)) { +if(!empty($optional_zip_countries)): ?> - + From 4fc637a6fceb5f0c911825a87924446da4f50ebd Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Tue, 7 Feb 2023 19:38:07 +0100 Subject: [PATCH 03/10] Update app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml Co-authored-by: Fabrizio Balliano --- .../template/directory/js/optional_zip_countries.phtml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index 97839637ef6..ea77bc9f358 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -26,10 +26,8 @@ * @see Mage_Core_Block_Template */ ?> -helper('directory')->getCountriesWithOptionalZip(false); -if(!empty($optional_zip_countries)): - ?> +helper('directory')->getCountriesWithOptionalZip(false) ?> + From 15f88de6211df01e97014984291f6d0540f2f6e6 Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Sat, 18 Feb 2023 13:36:35 +0100 Subject: [PATCH 05/10] Update optional_zip_countries.phtml --- .../template/directory/js/optional_zip_countries.phtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index e7c302b40c9..2f74dabd576 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -26,11 +26,11 @@ * @see Mage_Core_Block_Template */ ?> -helper('directory')->getCountriesWithOptionalZip(false) ?> - +helper('directory')->getCountriesWithOptionalZip(false) ?> + From 4f3d4e6c44096aa1a05ee3838ee125c0161a1213 Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Sat, 18 Feb 2023 13:37:11 +0100 Subject: [PATCH 06/10] Update optional_zip_countries.phtml --- .../default/template/directory/js/optional_zip_countries.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index 2f74dabd576..c53e0051b0d 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -30,7 +30,7 @@ From 3a03de343366c5f5cfc567f06cebdb54781b91fd Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Sat, 18 Feb 2023 13:38:12 +0100 Subject: [PATCH 07/10] Update optional_zip_countries.phtml --- .../template/directory/js/optional_zip_countries.phtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index c53e0051b0d..bfffaaf2288 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -29,8 +29,8 @@ helper('directory')->getCountriesWithOptionalZip(false) ?> From 179f73022aedca2ec931e5f2c70543bf8cf754b5 Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Sat, 18 Feb 2023 13:39:16 +0100 Subject: [PATCH 08/10] Update optional_zip_countries.phtml --- .../default/template/directory/js/optional_zip_countries.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index bfffaaf2288..b6054f167e8 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -30,7 +30,7 @@ From 6d4c7ee11f457e2e4619ef3d7e29b44583be46ff Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Sat, 18 Feb 2023 13:39:40 +0100 Subject: [PATCH 09/10] Update optional_zip_countries.phtml --- .../template/directory/js/optional_zip_countries.phtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index b6054f167e8..94f453f609a 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -28,9 +28,9 @@ ?> helper('directory')->getCountriesWithOptionalZip(false) ?> - + From 34fcd22acf644418a1ebf4b4ced4e0a2c46580f5 Mon Sep 17 00:00:00 2001 From: Loek van Gool Date: Sat, 18 Feb 2023 13:39:52 +0100 Subject: [PATCH 10/10] Update optional_zip_countries.phtml --- .../default/template/directory/js/optional_zip_countries.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml index 94f453f609a..51481f3ceb8 100644 --- a/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml +++ b/app/design/frontend/base/default/template/directory/js/optional_zip_countries.phtml @@ -27,7 +27,7 @@ */ ?> helper('directory')->getCountriesWithOptionalZip(false) ?> - +