S4nG0 Posted September 5, 2018 Share Posted September 5, 2018 Hello, My client came to me with quite a specific question: they created a voucher that lasted for 2 weeks and want to get the new accounts created within this specific period, given that these accounts used the voucher to place an order (or several). To me, this isn't native to Prestashop. Is it anyway possible to get this information by other means? Thanks for any ideas ! Link to comment Share on other sites More sharing options...
Knowband Plugins Posted September 5, 2018 Share Posted September 5, 2018 (edited) Its possible but you need to write some code/queries. You can find the orders (Order ID) from order_cart_rule table in which any particular voucher has been used. From the fetched order id, you can find out the customer ID from the order table. Now you need to use the customers table to find out the customers who registered between specific date & need to match the same with the order table customer result. It can also be possible in single join query but you need to put some effort on the same (if you are aware of DB queries). Edited September 5, 2018 by Knowband Plugins (see edit history) Link to comment Share on other sites More sharing options...
S4nG0 Posted September 5, 2018 Author Share Posted September 5, 2018 3 hours ago, Knowband Plugins said: If possible but you need to write some code & queries. You can find the orders (Order ID) via order_cart_rule table in which that particular voucher has been used. From the fetched order id, you can find out the customer ID from the order table. Now you need to use the customers table to find out the customers who registered between specific date & need to match the same with the order table customer result. It can also be possible in single join query but you need to put some effort on the same (if you are aware of DB queries). Thank you for you reply! I kind of expected that to be able to pull something like this you'd need to write some SQL queries, and you confirmed that. So that's what I'll try to do. 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