Nukem38 Posted April 5, 2020 Share Posted April 5, 2020 (edited) Bonjour 🙂 J'aimerai obtenir le liste des clients (e-mail en particulier) en fonction du produit. Dans l'objectif d’envoyer un email à tous les clients qui ont choisit le produit x (au moins il peut y avoir d"autres produits YZ inclus) Je pense pouvoir faire cela avec le Gestionnaire SQL de Prestashop 1.6.1.24 ? Merci Edited April 5, 2020 by shep68 précision (see edit history) Link to comment Share on other sites More sharing options...
idnovate.com Posted April 5, 2020 Share Posted April 5, 2020 (edited) Essayez ceci : SELECT c.email FROM ps_customer c LEFT JOIN ps_orders o ON (c.id_customer = o.id_customer) LEFT JOIN ps_order_detail od ON (o.id_order = od.id_order) WHERE od.product_id = 2 //Set your product ID GROUP BY 1 Edited April 5, 2020 by idnovate.com (see edit history) 1 1 Link to comment Share on other sites More sharing options...
MEG Venture Posted April 5, 2020 Share Posted April 5, 2020 Nice shot! 1 Link to comment Share on other sites More sharing options...
Nukem38 Posted April 14, 2020 Author Share Posted April 14, 2020 Le 05/04/2020 à 6:40 PM, idnovate.com a dit : Essayez ceci : SELECT c.email FROM ps_customer c LEFT JOIN ps_orders o ON (c.id_customer = o.id_customer) LEFT JOIN ps_order_detail od ON (o.id_order = od.id_order) WHERE od.product_id = 2 //Set your product ID GROUP BY 1 merci ça à l'air de fonctionner j'ai changé les tables "ps_" par "pss_" Merci encore 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