You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a dashboard for a client where they'd like to reach out to users with multiple wishlists and lots of saved elements. I can't think of a clean way to do a craft.users query but bring in wishlist count, I wondered if you had any ideas?
Additional context
No response
The text was updated successfully, but these errors were encountered:
I've added some text as a bit of a debug, but feel free to adjust to your needs. You'll need to loop through each user, get all their lists, check their list count, then check their total item count.
In terms of wanting to do a single query like "get me all users with X wishlists" that probably can't be done out of the box, other than some direct SQL in PHP/Twig.
Thanks yeah I was hoping to go the single query route to be able to sort by number of wishlists and then futher query/paginate. I'll come up with something else with some PHP. Cheers
Question
I'm working on a dashboard for a client where they'd like to reach out to users with multiple wishlists and lots of saved elements. I can't think of a clean way to do a
craft.users
query but bring in wishlist count, I wondered if you had any ideas?Additional context
No response
The text was updated successfully, but these errors were encountered: