Jump to content

How to see what orders used vouchers?


Recommended Posts

  • 2 years later...

In the back office, go to Advanced Parameters > SQL Manager, and create a new query with the following

SELECT * FROM `ps_order_cart_rule`

That will show you all the raw records in the database that have used a voucher.

 

You can then add some filtering if you are looking for a specific voucher

Link to comment
Share on other sites

SELECT  `shop_pres557`.`ps_order_cart_rule`.`name` ,  `shop_pres557`.`ps_customer`.`firstname` ,  `shop_pres557`.`ps_customer`.`lastname` ,  `shop_pres557`.`ps_customer`.`email` 

FROM  `shop_pres557`.`ps_order_cart_rule` 

LEFT OUTER JOIN  `shop_pres557`.`ps_orders` ON  `shop_pres557`.`ps_order_cart_rule`.`id_order` =  `shop_pres557`.`ps_orders`.`id_order` 

LEFT OUTER JOIN  `shop_pres557`.`ps_customer` ON  `shop_pres557`.`ps_customer`.`id_customer` =  `shop_pres557`.`ps_orders`.`id_customer` 

ORDER BY  `shop_pres557`.`ps_customer`.`firstname`;

 

 

I developed a little bit this query.

Now returns more useful data.

 

 - maybe someone has an idea how it can by optimize?

Edited by Ubuvolt (see edit history)
Link to comment
Share on other sites

@Ubuvolt

Your query does not work for me

 

undefined "checkedFrom" error...

his query does not have the word "checkedFrom" in it, so I suspect you changed his query. 

 

You also cannot use his query directly, since it has the name of the database in it shop_pres557.  I suspect your database name is different...

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...