From 6ae53b356ba056620316917c04f187e9a2e75701 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 22 Jul 2020 09:12:18 +0200 Subject: [PATCH] wait #3805 --- app/Templates/Category.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Templates/Category.php b/app/Templates/Category.php index 2888cf2..1c18ad4 100644 --- a/app/Templates/Category.php +++ b/app/Templates/Category.php @@ -95,7 +95,10 @@ class Category extends Base continue; } + $product->setLocale('fr'); + $slug_fr=$product->getPageData()->get('slug'); $product->setLocale($menu->getLocale()); + $canonical = $href = $product->getSlugOrTitleAttribute(); if ($root->findOneByHref($canonical) !== null) { continue; @@ -110,6 +113,7 @@ class Category extends Base $detail->setId('product/' . $product->id); $detail->setController(['controller' => 'ProductController', 'action' => 'productDetails', 'params' => ['id' => $product->id]]); $detail->hideInAllMenus(); + $detail->addUrlAliases([$slug_fr]); $menu->addChild($detail); } } -- 2.39.5