From 240d22165a0a3cf0bdd5fc1af1f212a21ef21895 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 15 Jun 2024 11:28:16 +0200 Subject: [PATCH 1/4] Fix cache current category ishomepage --- app/code/core/Mage/Catalog/Block/Navigation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/core/Mage/Catalog/Block/Navigation.php b/app/code/core/Mage/Catalog/Block/Navigation.php index aec5ab89920..3183d94ad31 100644 --- a/app/code/core/Mage/Catalog/Block/Navigation.php +++ b/app/code/core/Mage/Catalog/Block/Navigation.php @@ -74,6 +74,7 @@ public function getCacheKeyInfo() Mage::getDesign()->getPackageName(), Mage::getDesign()->getTheme('template'), Mage::getSingleton('customer/session')->getCustomerGroupId(), + Mage::getBlockSingleton('page/html_header')->getIsHomePage(), 'template' => $this->getTemplate(), 'name' => $this->getNameInLayout(), $this->getCurrenCategoryKey() From 4a9d2fa4bad0c6008532bbf71460391d55cc5b67 Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 16 Jun 2024 11:27:32 +0000 Subject: [PATCH 2/4] Revert "Fix cache current category ishomepage" This reverts commit 240d22165a0a3cf0bdd5fc1af1f212a21ef21895. --- app/code/core/Mage/Catalog/Block/Navigation.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/core/Mage/Catalog/Block/Navigation.php b/app/code/core/Mage/Catalog/Block/Navigation.php index 3183d94ad31..aec5ab89920 100644 --- a/app/code/core/Mage/Catalog/Block/Navigation.php +++ b/app/code/core/Mage/Catalog/Block/Navigation.php @@ -74,7 +74,6 @@ public function getCacheKeyInfo() Mage::getDesign()->getPackageName(), Mage::getDesign()->getTheme('template'), Mage::getSingleton('customer/session')->getCustomerGroupId(), - Mage::getBlockSingleton('page/html_header')->getIsHomePage(), 'template' => $this->getTemplate(), 'name' => $this->getNameInLayout(), $this->getCurrenCategoryKey() From 90b777216f9086a717268f49e42c99461ee4a77e Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 16 Jun 2024 11:28:03 +0000 Subject: [PATCH 3/4] set current-entity_key fix PDP navigation cache --- app/code/core/Mage/Catalog/Helper/Product.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/core/Mage/Catalog/Helper/Product.php b/app/code/core/Mage/Catalog/Helper/Product.php index 18882b54787..245222cf695 100644 --- a/app/code/core/Mage/Catalog/Helper/Product.php +++ b/app/code/core/Mage/Catalog/Helper/Product.php @@ -348,6 +348,7 @@ public function initProduct($productId, $controller, $params = null) $category = Mage::getModel('catalog/category')->load($categoryId); $product->setCategory($category); Mage::register('current_category', $category); + Mage::register('current_entity_key', $category->getPath()); } // Register current data and dispatch final events From 07dd8343221f330efad9d928775f65d8f01edccd Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 18 Jun 2024 10:10:55 +0200 Subject: [PATCH 4/4] =?UTF-8?q?highlight=20current=20category=20in=20men?= =?UTF-8?q?=C3=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skin/frontend/rwd/default/css/styles.css | 3 ++- skin/frontend/rwd/default/scss/layout/_header-nav.scss | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/skin/frontend/rwd/default/css/styles.css b/skin/frontend/rwd/default/css/styles.css index c44c8d9d3f5..21e2e8b88d2 100644 --- a/skin/frontend/rwd/default/css/styles.css +++ b/skin/frontend/rwd/default/css/styles.css @@ -3554,7 +3554,8 @@ a.skip-link { border-bottom: none; } .nav-primary a:hover, - .nav-primary li:hover > a { + .nav-primary li:hover, + .nav-primary li.active > a { color: #0472ad; } .nav-primary .menu-active { diff --git a/skin/frontend/rwd/default/scss/layout/_header-nav.scss b/skin/frontend/rwd/default/scss/layout/_header-nav.scss index 0dbe7b7e0ff..3ad96c3ff52 100644 --- a/skin/frontend/rwd/default/scss/layout/_header-nav.scss +++ b/skin/frontend/rwd/default/scss/layout/_header-nav.scss @@ -202,7 +202,8 @@ $nav-primary-height: 30px; } a:hover, - li:hover > a { + li:hover, + li.active > a { color: $c-action; }