OlivierBloo Posted December 2, 2021 Share Posted December 2, 2021 Bonjour à tous, Je suis en train de créer une requête SQL depuis le back Office Prestashop 1.7 qui récupère plusieurs données des commandes. Cependant, je tombe sur un blocage. Je n'arrive pas à récupérer le poids total de chaque commande dans une colonne. Voici ma requête : SELECT c.lastname AS Nom, c.firstname AS Prénom, c.email AS Email, a.phone AS Téléphone, a.address1 AS AdresseClient, a.postcode AS CodePostal, a.city AS Ville, o.reference AS RefCommande, o.date_add AS DateCommande, d.product_name AS Produit, d.product_quantity AS Quantité, d.total_price_tax_incl AS Montant, os.name AS ÉtatCommande, o.payment AS ModePaiement, carrier.name AS ModeLivraison, sl.name AS PointDeRetrait, sl.address1 AS AdresseLivraison, s.postcode AS CodePostal, s.city AS Ville, pdc.day AS JourRetrait, pdc.hour AS HeureRetrait, me.message FROM ps_order_detail d LEFT JOIN ps_orders o ON (d.id_order= o.id_order) LEFT JOIN ps_customer c ON (o.id_customer = c.id_customer) LEFT JOIN ps_group_lang gl ON (c.id_default_group = gl.id_group) AND gl.name LIKE 'club%' LEFT JOIN ps_address a ON (o.id_customer = a.id_address) LEFT JOIN ps_order_state_lang os ON (o.current_state = os.id_order_state) LEFT JOIN ps_address address ON (o.id_address_delivery = address.id_address) LEFT JOIN ps_carrier carrier ON (o.id_carrier = carrier.id_carrier) LEFT JOIN ps_state statelocation ON (address.id_state = statelocation.id_state) LEFT JOIN ps_product oproduct ON (d.product_id= oproduct.id_product) LEFT JOIN ps_message me ON (o.id_order = me.id_order) LEFT JOIN ps_product_shop sp ON (oproduct.id_product = sp.id_product) LEFT JOIN ps_prestatill_drive_creneau pdc ON (pdc.id_order = o.id_order) LEFT JOIN ps_store s ON (s.id_store = pdc.id_store) LEFT JOIN ps_store_lang sl ON (sl.id_store = pdc.id_store) AND sl.id_lang =1 WHERE os.id_lang = 1 ORDER BY pdc.id_store DESC Quelqu'un aurait-il une idée pour récupérer cette donnée ? Merci pour votre aide Link to comment Share on other sites More sharing options...
doekia Posted December 2, 2021 Share Posted December 2, 2021 Impossible de poster la réponse (you have been blocked) Link to comment Share on other sites More sharing options...
OlivierBloo Posted December 2, 2021 Author Share Posted December 2, 2021 Merci 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