]> _ Git - pmi.git/commitdiff
wait #3805
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 22 Jul 2020 07:12:18 +0000 (09:12 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 22 Jul 2020 07:12:18 +0000 (09:12 +0200)
app/Templates/Category.php

index 2888cf2035c7d4e8227184b43e4392354fc8005b..1c18ad49be219415516c259bcbfbe2068e8a201a 100644 (file)
@@ -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);
         }
     }