ditolas Posted September 15, 2014 Share Posted September 15, 2014 Hi all, I'm trying to get sales tent manufacturer and backoffice statistics for a page in the store. It was if someone could lend me a cable that do not really know how to do it because they do not get the sales charts. I'm with the docu but not cleared me. Someone help me Greetings !! Link to comment Share on other sites More sharing options...
NemoPS Posted September 15, 2014 Share Posted September 15, 2014 I hope I am the only one who didn't exactly understand what you need You mean you need some statistics about sold products, by a specific manufacturer only? Link to comment Share on other sites More sharing options...
ditolas Posted September 15, 2014 Author Share Posted September 15, 2014 (edited) I want to know is how to get the products sold by manufacturer in a query I'm doing a module to create users and manufacturers and I want to know how much each sells. I find the relationship between the manufacturer and ordering. Edited September 15, 2014 by ditolas (see edit history) Link to comment Share on other sites More sharing options...
promotionsonlie Posted September 15, 2014 Share Posted September 15, 2014 Thanks for your conversation. I am able to get few details with this. Link to comment Share on other sites More sharing options...
NemoPS Posted September 17, 2014 Share Posted September 17, 2014 Ah, so you need the db query? In that case try with SELECT COUNT(DISTINCT(o.id_order)) FROM ps_orders o LEFT JOIN ps_order_detail od ON (od.id_order = o.id_order)LEFT JOIN ps_product p ON (p.id_product = od.id_product) WHERE p.id_manufacturer = 1 of course 1 must be the manufacturer id you want Link to comment Share on other sites More sharing options...
Recommended Posts