From 4621479769e5d75bcab9e9fd058eb6b83575e4f7 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sun, 17 Sep 2023 23:46:55 +0100 Subject: [PATCH 1/2] Link to NotifyStock feed only if enabled --- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php index 496a8510849..e10275bc254 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php @@ -290,7 +290,11 @@ protected function _prepareColumns() ] ); - if (Mage::helper('catalog')->isModuleEnabled('Mage_Rss')) { + if ( + Mage::helper('catalog')->isModuleEnabled('Mage_Rss') && + Mage::helper('rss')->isRssEnabled() && + Mage::getStoreConfigFlag('rss/catalog/notifystock') + ) { $this->addRssList('rss/catalog/notifystock', Mage::helper('catalog')->__('Notify Low Stock RSS')); } From 580fb6768ca985965e00db9711a1ad3fb9c03c72 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Mon, 18 Sep 2023 09:08:13 +0100 Subject: [PATCH 2/2] I dont like this, but phpcs... --- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php index e10275bc254..781ae922d15 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php @@ -290,8 +290,7 @@ protected function _prepareColumns() ] ); - if ( - Mage::helper('catalog')->isModuleEnabled('Mage_Rss') && + if (Mage::helper('catalog')->isModuleEnabled('Mage_Rss') && Mage::helper('rss')->isRssEnabled() && Mage::getStoreConfigFlag('rss/catalog/notifystock') ) {