Jump to:
| Project: | Ubercart Views |
| Version: | 6.x-3.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | maksim24 |
| Status: | active |
Issue Summary
I only found this module yesterday and it's fantastic. I was playing with the "popular_products" block and realised it didn't quite do what I wanted so I wrote my own Top Sellers view instead. I've attached my module with this. It depends on uc_views and I based much of the code from the uc_views_marketing module and if anyone else finds this useful perhaps it could be patched into that module.
This module creates a view (default view included) showing the 10 best selling products on the site. It also makes sure that the product is active and only includes products sold in the last month. The time setting can be altered or removed in the Views UI. The default view just shows the product title (linked to node) and sell price. In the version I'm running, I'm using the Semantic Views module to output my data as an ordered list, but the version included here is unformatted.
It creates another database view which is storing the product node id, the timestamp of the last ordered product (it only uses orders that have a status of "completed") and the total number sold.
Feedback on this is more than welcome and I hope it proves useful to someone else.
| Attachment | Size |
|---|---|
| uc_views_top_sellers.zip | 5.68 KB |
Comments
#1
Hi, sorry for my english. I have a problem. I need to show top sellers block by week. In your sql table we have a 3 columns: nid, last_ordered, total_sold.
if i set in views setting filter last_ordered > current_time-7 day, the total_sold doesn't calculated in this period (7 day)
How can i resolve this issue?
Thank for your responded
#2
Sorry but I've stopped using Ubercart and have moved onto Drupal Commerce but maybe someone else can look into this issue.