Jimbola Posted February 5, 2014 Share Posted February 5, 2014 HI all, I need to send an e-mail to all customers who purchased a specific product. How do I get this information from Prestashop, I need to extract [selected Product] -> Order Ref - First Name - Surname - E-mail address - Purchase date - Country I know this needs to be done from myPHP the SQL query screen, but not sure how to write the query. All help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Jimbola Posted February 20, 2014 Author Share Posted February 20, 2014 OK I managed to do this by connecting connecting my store database (local environment of course) to MS Access. To do this; 1. Install MySQL ODBC 5.X driver 32/64bit (depending on you're version of Access not OS) from here 2. Follow this video tutorial on how to connect MS Access to MySQL database 3. Create a standard query in MS Access to get your data! Link to comment Share on other sites More sharing options...
Prestashopconector Posted February 20, 2014 Share Posted February 20, 2014 (edited) Try to do something like this linking ps_orders, ps_customers and ps_order detail to get the product you wanna filter. select od.* , o.*, c.* from ps_order_detail od join ps_orders o on od.id_order = o.id_order join ps_customer c on o.id_customer = c.id_customer where od.product_id = ? YOu need to customize the select to get the fields you are interested in, and of course change the question mark with the id of the product you are going to filter with. Edited December 9, 2014 by nadie Moderación del foro edita el mensaje: Quitado enlace de publicidad | Firma debe ir en la firma (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