[-] FO : fixed bug #PSCFV-5324 - Product url rewrite contains "root/home/"

This commit is contained in:
vAugagneur
2012-11-15 13:26:44 +00:00
parent 1b9a40489f
commit 4854f9137c
+2 -1
View File
@@ -132,7 +132,8 @@ class LinkCore
$params['category'] = (!$category) ? $product->category : $category;
$cats = array();
foreach ($product->getParentCategories() as $cat)
$cats[] = $cat['link_rewrite'];
if (!in_array($cat['id_category'], array(1, 2)))//remove root and home category from the URL
$cats[] = $cat['link_rewrite'];
$params['categories'] = implode('/', $cats);
}
$anchor = $ipa ? $product->getAnchor($ipa) : '';