Magento does not show up configurable base product in the best sellers. Code is:

// Filter only products with visibility catalog,search & catalog
$_visibility = array(
$_storeId = Mage::app()->getStore()->getId();
$_collection = Mage::getResourceModel('reports/product_collection')
    ->addOrderedQty('', '', true, false, false)
    ->addAttributeToFilter('visibility', $_visibility)
    ->setOrder('ordered_qty', 'desc');

How to show configurable products? Also which tables this collection would query?

  • Did you solve this? – snh_nl Mar 10 '16 at 20:19

You may try the following code to display the configurable products under the bestseller section.

// First make a copy, otherwise the rest of the page might be affected!
$collection = clone $this->getLoadedProductCollection();
// Unset the current products and filter before loading the next.
$collection->clear()->addAttributeToFilter('type_id', 'configurable')
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.