0

I have set "Use Categories Path for Product URLs" to "No", but still on frontend I am seeing product urls with category paths.
Checked attribute value on store level also, and it is set to "No" as required. I have performed re-indexation and cleared cahe (both Magento and browsers).
I am using Magento 1.4.2.0

UPDATE
When I am looking at product collection, it is not having any attirube named "request_path" instead it is showing "url_path".

Please let me know if it was a default magento bug in this version or I am missing something.
Any help will be appreciated.

5
  • Does your collection add the rewrites? As this when the request_path should be added? Also are the products saved with the urls wrong? Jul 30, 2014 at 12:51
  • @DavidManners There is issue in coding someone has loaded product object inside product collection loop on category page and request path is not present in loaded product object. Jul 30, 2014 at 12:56
  • So did you fix this issue? Might be good to share the solution if you have Jul 30, 2014 at 12:57
  • @DavidManners: I have added answer which worked for me. Jul 30, 2014 at 13:04
  • can someone help me with this ? magento.stackexchange.com/questions/81946/… Sep 7, 2015 at 10:59

2 Answers 2

0

You must make a Product URL Reindex

Admin Panel -> System -> Index Management -> Catalog URL Rewrites : Reindex data

If you have acces over ssh you can make reindex in terminal

magento_path/shell/ php indexer.php --reindex catalog_url

After make reindex you can empty all cache (just in case)

Admin Panel -> System -> Cache Management -> Flush Magento Cache/ Flush Storage Cache
1
  • I have already performed re-indexation and flushed cache. Jun 12, 2014 at 16:46
0

The issue is in coding, someone has loaded product object inside product collection loop on category page and request path is not present in loaded product object.
I wrote custom code to create url.

$urlVal = Mage::getStoreConfig('catalog/seo/product_use_categories'); 
if($urlVal == 0) {
$customProductUrl = $this->getBaseUrl() . $_product->getUrlPath();
} else if ($urlVal == 1) {
$customProductUrl = $_product->getProductUrl();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.