- Posts: 78
- Thank you received: 5
Report for first time customers
- brentwilliams2
-
Topic Author
- Offline
Less
More
4 years 11 months ago #336460
by brentwilliams2
Report for first time customers was created by brentwilliams2
-- HikaShop version -- : 4.4.3
We would like to reach out to customers who have purchased for the first time. I'm having trouble finding out how to get a report for that. Any suggestions? It could just be a report for customers with a confirmed order value of 1.
Thanks!
We would like to reach out to customers who have purchased for the first time. I'm having trouble finding out how to get a report for that. Any suggestions? It could just be a report for customers with a confirmed order value of 1.
Thanks!
Please Log in or Create an account to join the conversation.
4 years 11 months ago - 4 years 11 months ago #336474
by nicolas
Replied by nicolas on topic Report for first time customers
Hi,
You could get a listing of all the customers with their number of orders with a report with the display mode "listing" on "customers" with the "ordering" setting set to "orders". However, the first customers of the listing will be the ones with the most sales.
And if you have a lot of customers, you might not be able to display them all to export the CSV of all the data so that you can then open the CSV in Excel to remove the rows with a count greater than one.
A simple alternative would be to just run a MySQL query in your PHPMyAdmin to get the data.
Something like that:
where #__ needs to be replaced by the prefix of tables available in your Joomla configuration.
You could get a listing of all the customers with their number of orders with a report with the display mode "listing" on "customers" with the "ordering" setting set to "orders". However, the first customers of the listing will be the ones with the most sales.
And if you have a lot of customers, you might not be able to display them all to export the CSV of all the data so that you can then open the CSV in Excel to remove the rows with a count greater than one.
A simple alternative would be to just run a MySQL query in your PHPMyAdmin to get the data.
Something like that:
Code:
SELECT u.user_email,count(o.order_id) AS number_of_orders FROM #__hikashop_user AS u LEFT JOIN #__hikashop_order AS o ON o.order_user_id = u.user_id WHERE o.order_status IN ('confirmed','shipped') GROUP BY u.user_id ORDER BY number_of_orders ASC
Last edit: 4 years 11 months ago by nicolas.
Please Log in or Create an account to join the conversation.
- brentwilliams2
-
Topic Author
- Offline
Less
More
- Posts: 78
- Thank you received: 5
4 years 11 months ago #336507
by brentwilliams2
Replied by brentwilliams2 on topic Report for first time customers
First of all, you are awesome. The SQL query works if I change the end to "ORDER BY u.user_id DESC". This essentially shows me the latest users and I can pick out the ones who have an order number of 1.
Thanks!
Thanks!
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.192 seconds