jungwirbtgut Posted November 3, 2020 Share Posted November 3, 2020 Hey, I would like to have an CSV list to see all order which used a specific coupon/voucher. I found this SQL down there in an old topic.. But it's not working correctly. Problem The sql codes table shows all used vouchers in one list, sorted by firstname Solution I only need "date | order-number | voucher | order amount" as collums. And it would be great if I can enter a manual voucher code inside the SQL. Could may someone help me out here? Thank you very much! I think its also interesting for other users. SELECT `dbname`.`ps_order_cart_rule`.`name` , `dbname`.`ps_customer`.`firstname` , `dbname`.`ps_customer`.`lastname` , `dbname`.`ps_customer`.`email` FROM `dbname`.`ps_order_cart_rule` LEFT OUTER JOIN `dbname`.`ps_orders` ON `dbname`.`ps_order_cart_rule`.`id_order` = `dbname`.`ps_orders`.`id_order` LEFT OUTER JOIN `dbname`.`ps_customer` ON `dbname`.`ps_customer`.`id_customer` = `dbname`.`ps_orders`.`id_customer` ORDER BY `dbname`.`ps_customer`.`firstname`; 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