i'm using layered navigation in product view page.
On click on any filter, it's simply appending those filter at the end of current url
Example,
This is my current product page url,
http://host.com/mento17/index.php/category/product1.html
On same product page if i filter by price, i'm redirecing to
http://host.com/mento17/lovablenew/index.php/category/product1.html&price=100-500
I should go to category listing page,
http://host.com/mento17/index.php/category.html&price=100-500
getUrl()
is the function which is generating url from /app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php
It's mentioned like below,
public function getUrl()
{
$query = array(
$this->getFilter()->getRequestVar()=>$this->getValue(),
Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
);
return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
}
Above function simply appending filter at the end of current url. This works fine in category page but not in product page.
Is there any way to make it work in product page by altering url ?