diff --git a/.github/phpstan-baseline.neon b/.github/phpstan-baseline.neon index 7d13eadf752..f1cd39aa884 100644 --- a/.github/phpstan-baseline.neon +++ b/.github/phpstan-baseline.neon @@ -290,11 +290,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php - - - message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getRegionJsonByStore\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php - - message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getNamePrefixOptions\\(\\)\\.$#" count: 1 @@ -4505,11 +4500,6 @@ parameters: count: 2 path: ../app/code/core/Mage/Dataflow/Model/Profile.php - - - message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getRegionJson\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php - - message: "#^Cannot call method addCountryFilter\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" count: 2 @@ -7335,11 +7325,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Tag/Model/Tag/Relation.php - - - message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:getRegionJson\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php - - message: "#^Call to an undefined method Mage_Core_Helper_Abstract\\:\\:validateCatalogPricesAndFptConfiguration\\(\\)\\.$#" count: 2 diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php index 7815934a028..b0d077dca41 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php @@ -59,9 +59,7 @@ public function __construct(array $args = array()) public function render(Varien_Data_Form_Element_Abstract $element) { $country = $element->getForm()->getElement('country_id'); - if (!is_null($country)) { - $countryId = $country->getValue(); - } else { + if (is_null($country)) { return $element->getDefaultHtml(); } @@ -84,7 +82,7 @@ public function render(Varien_Data_Form_Element_Abstract $element) $html .= '' . "\n"; $html .= '' . "\n"; diff --git a/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php b/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php index 256dfc1d2c7..84f5095f8f6 100644 --- a/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php +++ b/app/code/core/Mage/Directory/Block/Adminhtml/Frontend/Region/Updater.php @@ -33,7 +33,7 @@ class Mage_Directory_Block_Adminhtml_Frontend_Region_Updater extends Mage_Adminh protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { $html = parent::_getElementHtml($element); - $html .= ""; + $html .= ""; return $html; } diff --git a/app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php b/app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php index 476ea5ff4f6..daecf0aa0a8 100644 --- a/app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php +++ b/app/code/core/Mage/Tax/Block/Adminhtml/Frontend/Region/Updater.php @@ -48,7 +48,7 @@ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) } '; - $html .= sprintf($js, $this->helper('directory')->getRegionJson()); + $html .= sprintf($js, Mage::helper('directory')->getRegionJsonByStore()); return $html; } } diff --git a/app/design/adminhtml/default/default/template/tax/rate/form.phtml b/app/design/adminhtml/default/default/template/tax/rate/form.phtml index df460fda9f5..8d4b864d869 100644 --- a/app/design/adminhtml/default/default/template/tax/rate/form.phtml +++ b/app/design/adminhtml/default/default/template/tax/rate/form.phtml @@ -29,5 +29,5 @@ getChildHtml('form_after');?> diff --git a/app/design/adminhtml/default/default/template/weee/renderer/tax.phtml b/app/design/adminhtml/default/default/template/weee/renderer/tax.phtml index 8e6e08c5ce6..c931b805b68 100644 --- a/app/design/adminhtml/default/default/template/weee/renderer/tax.phtml +++ b/app/design/adminhtml/default/default/template/weee/renderer/tax.phtml @@ -114,7 +114,7 @@ $(data.prefix + '_weee_tax_row_'+data.index+'_country').value = data.country; $(data.prefix + '_weee_tax_row_'+data.index+'_website').value = data.website_id; - updater = new RegionUpdater(data.prefix + '_weee_tax_row_'+data.index+'_country', null, data.prefix + '_weee_tax_row_'+data.index+'_state', helper('directory')->getRegionJson() ?>, 'disable', true); + updater = new RegionUpdater(data.prefix + '_weee_tax_row_'+data.index+'_country', null, data.prefix + '_weee_tax_row_'+data.index+'_state', getRegionJsonByStore() ?>, 'disable', true); updater.update(); $(data.prefix + '_weee_tax_row_'+data.index+'_state').value = data.state; diff --git a/app/design/frontend/base/default/template/checkout/cart/shipping.phtml b/app/design/frontend/base/default/template/checkout/cart/shipping.phtml index c707d83eeb5..a66a50ffcaf 100644 --- a/app/design/frontend/base/default/template/checkout/cart/shipping.phtml +++ b/app/design/frontend/base/default/template/checkout/cart/shipping.phtml @@ -74,7 +74,7 @@ diff --git a/app/design/frontend/base/default/template/checkout/onepage/billing.phtml b/app/design/frontend/base/default/template/checkout/onepage/billing.phtml index 08f47375339..edc05490dfd 100644 --- a/app/design/frontend/base/default/template/checkout/onepage/billing.phtml +++ b/app/design/frontend/base/default/template/checkout/onepage/billing.phtml @@ -220,6 +220,6 @@ //billingForm.setElementsRelation('billing:country_id', 'billing:region', 'getUrl('directory/json/childRegion') ?>', '__('Select State/Province...') ?>'); $('billing-address-select') && billing.newAddress(!$('billing-address-select').value); - var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode'); + var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', getRegionJsonByStore() ?>, undefined, 'billing:postcode'); //]]> diff --git a/app/design/frontend/base/default/template/checkout/onepage/shipping.phtml b/app/design/frontend/base/default/template/checkout/onepage/shipping.phtml index be42d10cd75..44106214be4 100644 --- a/app/design/frontend/base/default/template/checkout/onepage/shipping.phtml +++ b/app/design/frontend/base/default/template/checkout/onepage/shipping.phtml @@ -152,6 +152,6 @@ //shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', 'getUrl('directory/json/childRegion') ?>', 'jsQuoteEscape($this->__('Select State/Province...')) ?>'); $('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value); - var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode'); + var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', getRegionJsonByStore() ?>, undefined, 'shipping:postcode'); //]]> diff --git a/app/design/frontend/base/default/template/customer/address/edit.phtml b/app/design/frontend/base/default/template/customer/address/edit.phtml index 9f9acd4051a..4716c94f389 100644 --- a/app/design/frontend/base/default/template/customer/address/edit.phtml +++ b/app/design/frontend/base/default/template/customer/address/edit.phtml @@ -160,6 +160,6 @@ diff --git a/app/design/frontend/base/default/template/customer/form/address.phtml b/app/design/frontend/base/default/template/customer/form/address.phtml index b95e7861764..835e682d275 100644 --- a/app/design/frontend/base/default/template/customer/form/address.phtml +++ b/app/design/frontend/base/default/template/customer/form/address.phtml @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - +

getAddressId()): ?>__('Edit Address Entry') ?>__('New Address Entry') ?>

diff --git a/app/design/frontend/base/default/template/customer/form/register.phtml b/app/design/frontend/base/default/template/customer/form/register.phtml index d25b217ca61..cd3b8af6ba0 100644 --- a/app/design/frontend/base/default/template/customer/form/register.phtml +++ b/app/design/frontend/base/default/template/customer/form/register.phtml @@ -192,7 +192,7 @@ //getShowAddressFields()): ?> - new RegionUpdater('country', 'region', 'region_id', helper('directory')->getRegionJson() ?>, undefined, 'zip'); + new RegionUpdater('country', 'region', 'region_id', getRegionJsonByStore() ?>, undefined, 'zip'); //]]> diff --git a/app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml b/app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml index c90d696e92d..075cc35ee05 100644 --- a/app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml +++ b/app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml @@ -218,7 +218,7 @@ //billingForm.setElementsRelation('billing:country_id', 'billing:region', 'getUrl('directory/json/childRegion') ?>', 'jsQuoteEscape($this->__('Select State/Province...')) ?>'); $('billing-address-select') && billing.newAddress(!$('billing-address-select').value); - var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode'); + var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', getRegionJsonByStore() ?>, undefined, 'billing:postcode'); if ($('onepage-guest-register-button')) { Event.observe($('onepage-guest-register-button'), 'click', function(event) { var billingRememberMe = $('co-billing-form').select('#remember-me-box'); diff --git a/app/design/frontend/base/default/template/persistent/customer/form/register.phtml b/app/design/frontend/base/default/template/persistent/customer/form/register.phtml index 91f9edf71e6..6fddd97d6f9 100644 --- a/app/design/frontend/base/default/template/persistent/customer/form/register.phtml +++ b/app/design/frontend/base/default/template/persistent/customer/form/register.phtml @@ -194,7 +194,7 @@ //getShowAddressFields()): ?> - new RegionUpdater('country', 'region', 'region_id', helper('directory')->getRegionJson() ?>, undefined, 'zip'); + new RegionUpdater('country', 'region', 'region_id', getRegionJsonByStore() ?>, undefined, 'zip'); //]]> diff --git a/app/design/frontend/default/iphone/template/paypal/express/review.phtml b/app/design/frontend/default/iphone/template/paypal/express/review.phtml index 37f05860a14..96d403ee25e 100644 --- a/app/design/frontend/default/iphone/template/paypal/express/review.phtml +++ b/app/design/frontend/default/iphone/template/paypal/express/review.phtml @@ -34,7 +34,7 @@ $shippingAddress = $this->getShippingAddress(); getMessagesBlock()->toHtml() ?>
diff --git a/app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml b/app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml index 0eb7a83f92f..d3a7df3757b 100644 --- a/app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml +++ b/app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml @@ -82,7 +82,7 @@ diff --git a/app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml b/app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml index 11cdab6adc3..28b902f4266 100644 --- a/app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml +++ b/app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml @@ -153,6 +153,6 @@ //shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', 'getUrl('directory/json/childRegion') ?>', 'jsQuoteEscape($this->__('Select State/Province...')) ?>'); $('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value); - var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode'); + var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', getRegionJsonByStore() ?>, undefined, 'shipping:postcode'); //]]> diff --git a/app/design/frontend/rwd/default/template/customer/address/edit.phtml b/app/design/frontend/rwd/default/template/customer/address/edit.phtml index 7a3826d6ad4..f441828b11b 100644 --- a/app/design/frontend/rwd/default/template/customer/address/edit.phtml +++ b/app/design/frontend/rwd/default/template/customer/address/edit.phtml @@ -161,6 +161,6 @@ diff --git a/app/design/frontend/rwd/default/template/customer/form/address.phtml b/app/design/frontend/rwd/default/template/customer/form/address.phtml index 6744be2f804..6440ea5ea5c 100644 --- a/app/design/frontend/rwd/default/template/customer/form/address.phtml +++ b/app/design/frontend/rwd/default/template/customer/form/address.phtml @@ -24,7 +24,7 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - +

getAddressId()): ?>__('Edit Address Entry') ?>__('New Address Entry') ?>

diff --git a/app/design/frontend/rwd/default/template/paypal/express/review/address.phtml b/app/design/frontend/rwd/default/template/paypal/express/review/address.phtml index 2be64ae566b..76cd3b90eb6 100644 --- a/app/design/frontend/rwd/default/template/paypal/express/review/address.phtml +++ b/app/design/frontend/rwd/default/template/paypal/express/review/address.phtml @@ -146,7 +146,7 @@
diff --git a/app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml b/app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml index 2266732e4cc..cb2d2a79eee 100644 --- a/app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml +++ b/app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml @@ -220,7 +220,7 @@ //billingForm.setElementsRelation('billing:country_id', 'billing:region', 'getUrl('directory/json/childRegion') ?>', 'jsQuoteEscape($this->__('Select State/Province...')) ?>'); $('billing-address-select') && billing.newAddress(!$('billing-address-select').value); - var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode'); + var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', getRegionJsonByStore() ?>, undefined, 'billing:postcode'); if ($('onepage-guest-register-button')) { Event.observe($('onepage-guest-register-button'), 'click', function(event) { var billingRememberMe = $('co-billing-form').select('#remember-me-box'); diff --git a/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml b/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml index 73a698057f3..3205eaa4825 100644 --- a/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml +++ b/app/design/frontend/rwd/default/template/persistent/customer/form/register.phtml @@ -190,7 +190,7 @@ //getShowAddressFields()): ?> - new RegionUpdater('country', 'region', 'region_id', helper('directory')->getRegionJson() ?>, undefined, 'zip'); + new RegionUpdater('country', 'region', 'region_id', getRegionJsonByStore() ?>, undefined, 'zip'); //]]>