You have no items in your shopping cart.

Subtotal: $0.00

All Weather

$_idsForTheQuery = $_productCollection->getAllIds(); $read = Mage::getSingleton('core/resource')->getConnection('core_read'); $sql_query = "SELECT parent_id, COUNT(parent_id) AS colors FROM (SELECT cpr.parent_id FROM `eav_attribute` a LEFT JOIN `catalog_product_entity_int` cpei ON cpei.attribute_id=a.attribute_id LEFT JOIN `catalog_product_relation` cpr ON cpr.child_id=cpei.entity_id WHERE attribute_code = 'color' AND cpr.parent_id IN (".implode (", ", $_idsForTheQuery).") GROUP BY cpr.parent_id, cpei.value) colors GROUP BY parent_id"; $results = $read->query($sql_query); $number_of_colors_by_id_array = array(); foreach($results as $r) { $number_of_colors_by_id_array[$r["parent_id"]] = $r["colors"]; } getId()]>1): ?>
Grid  List 
Grid  List