diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo.php new file mode 100644 index 000000000000..3d23ae1f7117 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo.php @@ -0,0 +1,46 @@ +isValueChanged()) { + Mage::getModel('index/indexer') + ->getProcessByCode(Mage_Catalog_Helper_Category_Flat::CATALOG_CATEGORY_FLAT_PROCESS_CODE) + ->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX); + + Mage::getModel('index/indexer') + ->getProcessByCode(Mage_Catalog_Helper_Product_Flat::CATALOG_FLAT_PROCESS_CODE) + ->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX); + } + return $this; + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php index 97ecc865ff17..9bb5c89ff143 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php @@ -21,12 +21,18 @@ class Mage_Adminhtml_Model_System_Config_Backend_Seo_Product extends Mage_Core_Model_Config_Data { /** - * Refresh category url rewrites if configuration was changed + * Refresh products url rewrites if configuration was changed * * @return $this */ protected function _afterSave() { + if ($this->isValueChanged()) { + Mage::getModel('index/indexer') + ->getProcessByCode(Mage_Catalog_Helper_Product_Flat::CATALOG_FLAT_PROCESS_CODE) + ->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX); + } + return $this; } } diff --git a/app/code/core/Mage/Catalog/etc/system.xml b/app/code/core/Mage/Catalog/etc/system.xml index 59a748a5cab9..40ddd7013c54 100644 --- a/app/code/core/Mage/Catalog/etc/system.xml +++ b/app/code/core/Mage/Catalog/etc/system.xml @@ -262,7 +262,6 @@ - Changing this option requires full reindex of "catalog_url" select adminhtml/system_config_source_yesno adminhtml/system_config_backend_seo_product @@ -273,9 +272,9 @@ - Changing this option requires full reindex of "catalog_url" select adminhtml/system_config_source_yesno + adminhtml/system_config_backend_seo 4 1 0