31 December 2011

No. Units Sold for Stats Forecast Category Distribution table v1.0

Adds the number of units sold to the Stats Forecast Category Distribution table.
#
#----------[ OPEN ]----------
#
modules/statsforecast/statsforecast.php

#
#----------[ FIND ]----------
#
    <tr><th style="width:50px">'.$this->l('Category').'</th><th>'.$this->l('Count').'</th><th>'.$this->l('Sales').'</th><th>'.$this->l('% Count').'</th><th>'.$this->l('% Sales').'</th><th>'.$this->l('Avg price').'</th></tr>';

#
#----------[ REPLACE WITH ]----------
#
    <tr><th style="width:50px">'.$this->l('Category').'</th><th>'.$this->l('Count').'</th><th>'.$this->l('Units').'</th><th>'.$this->l('Sales').'</th><th>'.$this->l('% Count').'</th><th>'.$this->l('% Sales').'</th><th>'.$this->l('Avg price').'</th></tr>';

#
#----------[ FIND ]----------
#
     <td align="right">'.$catrow['orderQty'].'</td>

#
#----------[ AFTER, ADD ]----------
#
     <td align="right">'.$catrow['unitsSold'].'</td>

#
#----------[ FIND ]----------
#
COUNT(*) AS orderQty, 

#
#----------[ AFTER, ADD ]----------
#
SUM(od.`product_quantity`) AS unitsSold,

No comments:

Post a Comment