ProductListing based on Attribute in Magento

Posted by Keenora Fluffball on Stack Overflow See other posts from Stack Overflow or by Keenora Fluffball
Published on 2011-11-10T09:54:17Z Indexed on 2011/11/22 9:52 UTC
Read the original article Hit count: 363

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about php

Related posts about magento