noesac Posted September 22, 2012 Share Posted September 22, 2012 (edited) The back office already shows "Total orders" but I would also like to see total products sold. I never use the "Total registrations" field anyway so I figured I'll just repurpose it. UPDATE: I figured it out. It's a bit of a hack but if anyone knows a better way to do it feel free to contribute. On line 124 of statshome.php, change: $result2 = Db::getInstance()->getRow('SELECT COUNT(`id_customer`) AS total_registrationsFROM `'._DB_PREFIX_.'customer` cWHERE c.`date_add` BETWEEN '.ModuleGraph::getDateBetween()); To: $result2 = Db::getInstance()->getRow('SELECT COUNT(*) as total_registrationsFROM `'._DB_PREFIX_.'orders` oLEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.id_order = od.id_orderLEFT JOIN `'._DB_PREFIX_.'currency` c ON o.id_currency = c.id_currencyWHERE o.valid = 1AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween()); Edited September 22, 2012 by noesac (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now