ProductListing based on Attribute in Magento
- by Keenora Fluffball
I would like to show "Suggestions" in my product listing in Magento. I made an attribute "Suggestion" which is Yes/No and global active. Now in the listing I would like to show the suggestions first, then some text and stuff, and then the rest of products.
I tried it like this:
$_productCollection=$this->getLoadedProductCollection()
/* .... */
$_productCollection->clear()->addAttributeToFilter('suggestion', 1)->load();
But this ends in an exception:
You cannot define a correlation name '_price_rule' more than once
Now the question is, how to solve this?