Question: I want to add a "Reset all filters" button
This is basically a link to a current category. So add this code to any file you wish (whatever part of the site you want it to appear on):
Virtuemart 1.1
Virtuemart 2
Virtuemart 1.1
$itemid = JRequest::getVar('Itemid', ''); $category_id = JRequest::getVar('category_id', ''); $url='/index.php?option=com_virtuemart&page=shop.browse&Itemid='. $itemid. '&category_id='. $category_id. '&limitstart=0'; echo '<a href="' . $url . '">Reset all filters</a>';
Virtuemart 2
$itemid = JRequest::getVar('Itemid', ''); $category_id = JRequest::getVar('virtuemart_category_id', ''); $url='/index.php?option=com_virtuemart&view=category&Itemid='. $itemid. '&virtuemart_category_id='. $category_id. '&limitstart=0'; echo '<a href="' . $url . '">Reset all filters</a>';