Magento does not show up configurable base product in the best sellers. Code is:
// Filter only products with visibility catalog,search & catalog
$_visibility = array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH
);
$_storeId = Mage::app()->getStore()->getId();
$_collection = Mage::getResourceModel('reports/product_collection')
->addOrderedQty('', '', true, false, false)
->addAttributeToSelect('*')
->addAttributeToFilter('visibility', $_visibility)
->addStoreFilter($_storeId)
->setOrder('ordered_qty', 'desc');
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($_collection);
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($_collection);
How to show configurable products? Also which tables this collection would query?