Nulumia
Customer
I've been tinkering with some code to get a Best Selling feature working in eCommerce, with the latest approach using the finders with Order Items matched against product IDs, which are sourced from category IDs. But I don't think this is ideal as it requires several loops to gather multiple products .
To be digital/physical agnostic, I'm wondering if you'd consider appending a purchase_count column onto the Product entity, and then bumping this whenever there's a purchase? This would be lightweight like other finders, and I'd imagine could be easily rebuilt using Admin -> Tools. Or, do you have a different idea?
A very simple but hacky way to do this digital-only shops is a widget which finds by:
But of course this isn't entirely accurate.
Eventually besides widgets, I'd like to built a "Top selling products" area of the admin dashboard, where you'd normally find income graphs etc. Woocommerce for Wordpress has this so I think it'd be killer in Xenforo .
-Robert
To be digital/physical agnostic, I'm wondering if you'd consider appending a purchase_count column onto the Product entity, and then bumping this whenever there's a purchase? This would be lightweight like other finders, and I'd imagine could be easily rebuilt using Admin -> Tools. Or, do you have a different idea?
A very simple but hacky way to do this digital-only shops is a widget which finds by:
PHP:
->where('is_paid', true)
->where('download_count', '>', 0)
->setDefaultOrder('download_count', 'desc');
Eventually besides widgets, I'd like to built a "Top selling products" area of the admin dashboard, where you'd normally find income graphs etc. Woocommerce for Wordpress has this so I think it'd be killer in Xenforo .
-Robert
Last edited:
Upvote
0