Post by KyleXY » Thu Jun 14, 2018 8:33 am

Hi there,

I did try to purchase a plugin that could generate such a report, however, it conflicted with other plugins, so it didn't work as it should have. This is only a one time thing, so a plugin is not really necessary...

I am trying to find out what customers ordered a particular product, how many they ordered and what their contact information is. I know this can be done through a MySQL query - I can easily get the list of orders IDs containing the product, but I don't know how to then join that to getting the actual order so I could export the file. Is someone able to help me with this?

Thank you!



Mon Aug 31, 2015 10:16 pm
Location - Australia

Post by MarketInSG » Thu Jun 14, 2018 8:45 am

Code: Select all

SELECT * FROM order_product op LEFT JOIN `order` o ON o.order_id = op.order_id WHERE product_id = 'X'
This will give you the relevant order details, filtered by a specific product ID. There, you will have the customer ID as well

User avatar
Guru Member


Wed Nov 16, 2011 11:53 am
Location - Singapore
Who is online

Users browsing this forum: No registered users and 26 guests