Reputation: 365
i'm looking for a way in magento search to display all products. it's for a quick search by attribute purpose, i implemented GET filters which adds attributes to filter to collection list, and i want to apply them to the full products collection.
if(count($_GET) > 0 && $isSearchPage){
$_productCollection = $_productCollection->clear()->addAttributeToSelect('*');
$suffix = array();
foreach($_GET as $filter => $value){
$suffix[$filter] = $value;
if($filter != 'q' && $filter != 'limit' && $filter != 'p'){
$_productCollection->addAttributeToFilter($filter,$value);
}
}
}
So far i tried
/catalogsearch/result/?q=%
/catalogsearch/result/?q=*
q=% return results, but not all of them. Is there a way to do what i'm trying to achieve ? Or am I heading in the wrong direction
Upvotes: 2
Views: 65