Hi,
I have a problem with magento product links. When I search a product and then click the product link, Magento redirects me to index.php/test666.html when it supposed to be index.php/products/grocery/miso-soup/test666.html.
is it possible to force Magento use product's full path?
Added:
I can't get it to work by enabling 'Use Categories Path for Product URLs'. So I ended up with the following code.
$categories = $_product->getCategoryIds();
$lastCategory = $_categoryModel->load(end($categories));
$urlPath = explode("/",$lastCategory->getUrlPath());
$urlPathCnt = count($urlPath)-1;
$urlPath[$urlPathCnt] = str_replace(".html","",$urlPath[$urlPathCnt]);
$productUrl = "/".implode("/",$urlPath)."/".$_product->getUrlKey().".html";
but I really don't like this way. It uses unnecessary resource. Any ideas??