*/ class Mage_Sales_Model_Resource_Helper_Mysql4 extends Mage_Core_Model_Resource_Helper_Mysql4 implements Mage_Sales_Model_Resource_Helper_Interface { /** * Update rating position * * @param string $aggregation One of Mage_Sales_Model_Resource_Report_Bestsellers::AGGREGATION_XXX constants * @param array $aggregationAliases * @param string $mainTable * @param string $aggregationTable * @return Mage_Sales_Model_Resource_Helper_Abstract */ public function getBestsellersReportUpdateRatingPos($aggregation, $aggregationAliases, $mainTable, $aggregationTable ) { /** @var $reportsResourceHelper Mage_Reports_Model_Resource_Helper_Interface */ $reportsResourceHelper = Mage::getResourceHelper('reports'); if ($aggregation == $aggregationAliases['monthly']) { $reportsResourceHelper ->updateReportRatingPos('month', 'qty_ordered', $mainTable, $aggregationTable); } elseif ($aggregation == $aggregationAliases['yearly']) { $reportsResourceHelper ->updateReportRatingPos('year', 'qty_ordered', $mainTable, $aggregationTable); } else { $reportsResourceHelper ->updateReportRatingPos('day', 'qty_ordered', $mainTable, $aggregationTable); } return $this; } }