Vote up!
Vote down!

How do I count how many Orders a certain user has created?

I would like to count how many Orders a user has created, but I'm not familiar with Views Aggregation. Can someone help me understand the steps?

Josh Miller
Asked by: Josh Miller
on March 8, 2013

2 Answers

Vote up!
Vote down!

That's easy! Here are the steps to recreate it:

1) Create a View of "Orders"
2) Click "Advanced" and then "Aggregation" and turn it on
3) Click on the field Order: ID and change the label to "Orders"
4) Click on the field's aggregation settings and change it to "Count"
5) Add a field for Order: uid
6) Set aggregation to "group by"
7) Done!


Ryan Szrama
Answer by: Ryan Szrama
Posted: Mar 8, 2013
Vote up!
Vote down!


I just created a fiel in the user profile to count previous orders in order to send it in the mail to the merchant after each purchase.

Do you know how can update that field with the total purchase so far?
I tried the agregation an vbo, but I can update that field with the agregation result.


Answer by: leo
Posted: Mar 18, 2015