I am trying to display the search result sorted by attribute_set_id.
I want to display them with the title as the name of the first attribute_set and then all the products that belong to attribute_set_id 1 and then title of attribute_set 2 and then the products in attribute set 2.
Any one got an idea on how i can make this happened?
I have tried to sort the result list by the following code
<?php $_productCollection = clone $this->getLoadedProductCollection();
$_productCollection->clear()
->addAttributeToSelect('*')
->addAttributeToSort('attribute_set_id', 'DESC')
->load();
?>