Downloads
uc_best_sellers keeps track of how many times a product has sold. This is primarily useful for providing a block to display best sellers (that's why I wrote it, anyway).
Order count is maintained in a separate table along with the nid of the associated product. It's not model-specific at this point, it's only useful for tracking the number of times a product's primary SKU has sold. It's integrated with a CA hook that fires when an order is finalized and submitted. The count sold is incremented for each line item in the order based on the quantity purchased.
The module provides a views field that you can use to sort products by "Sold Count". It's a regular views field, so I suppose you could use it for other things (products that have sold more than 100 times, or something), but I use it for just sorting out best sellers.
It also hooks in with nodeapi to add the sold_count field to product nodes, so you could display it in your template files if you want.
When you install the module it sums up the sold count for each product in the uc_order_product table, so it will calculate the correct number of times each product has sold in the past.
Comments are appreciated, and I hope this helps someone!
| Preview | Attachment | Size |
|---|---|---|
| uc_best_sellers.zip | 6.08 KB |
