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.

CommentFileSizeAuthor
uc_views_top_sellers.zip5.68 KBDrupalGideon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maksim24’s picture

Assigned: Unassigned » maksim24

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

DrupalGideon’s picture

Sorry but I've stopped using Ubercart and have moved onto Drupal Commerce but maybe someone else can look into this issue.

MakeOnlineShop’s picture

Hello,

Can I know if your top seller module is the best to show what customers buy the most on my shops ?

Thanks.

haysuess’s picture

Thanks for this module :)

I already had a top_sellers view, so this one didn't create anything new. All I had to do though was add the "Last Ordered" filter and set it to greater than or equal to -1 month to show the top sellers for the past month.

This filter should already be included in UC Views.

carl_adriano’s picture

may i know if there's a D7 version?

stoan’s picture

Drupal 7 Ubercart 3 equivalent? Anyone?

longwave’s picture

This feature may eventually be available in 7.x-3.x in #1339910: Add "Popular Products" view

dvasquez’s picture