nabo Posted March 9, 2016 Share Posted March 9, 2016 Hi all I tried and tried but I couldn't achieve my goal. Is there a way to export product quantity split by combinations? I handle a shop that sells t-shirt in various sizes, but I was able only to get the total quantity. Do I need some additional modules? Should I write my own query? thanks Link to comment Share on other sites More sharing options...
prestatent Posted March 14, 2016 Share Posted March 14, 2016 Prestashop 1.6.0.8 Hi This will do what you need. I use multi-shop which is why there are references to id_shop. You should run this in PHPMyAdmin or whatever database tool you use. SELECT e.name as prodname, a.reference as sku, c.name as colour, f.quantity as quantity FROM ps_product_lang e, ps_product_attribute a, ps_product_attribute_combination b, ps_attribute_lang c, ps_attribute d, ps_stock_available f WHERE e.id_lang = 2 AND e.id_shop = 2 AND e.id_product = a.id_product AND a.id_product_attribute = b.id_product_attribute AND b.id_attribute = c.id_attribute AND c.id_attribute = d.id_attribute AND c.id_lang = 2 AND a.id_product = f.id_product AND a.id_product_attribute = f.id_product_attribute AND e.id_shop = f.id_shop order by e.name asc, d.id_attribute asc Cheers. 1 Link to comment Share on other sites More sharing options...
nabo Posted March 22, 2016 Author Share Posted March 22, 2016 Thank you very much!!!! 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