Jump to content
  • 0

Consulta SQL clientes con vale descuento



¿Alguien podría echarme un cable con esto? Necesito hacer una consulta Sql a la base de datos para extraer los datos Nombre, apellido, teléfono y email, de las personas que actualmente tienen un vale descuento en mi tienda online.  Gracias :-)

Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0


No uso esa funcionalidad en mi tienda por lo que no podría probar la consulta. Probá lo siguiente:

SELECT c.id_customer AS 'ID Cliente', 
c.firstname AS 'Nombre', 
c.lastname AS 'Apellido', 
c.email AS 'Email', 
a.phone AS 'Telefono', 
crl.name AS 'Vale'
FROM ps_customer AS c 
JOIN ps_address AS a ON c.id_customer = a.id_customer 
JOIN ps_cart_rule AS cr ON c.id_customer = cr.id_customer 
JOIN ps_cart_rule_lang AS crl ON cr.id_cart_rule =crl.id_cart_rule 
WHERE cr.id_cart_rule > 0
GROUP BY c.id_customer 


(Versión 1.6 de PrestaShop)

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More