Commerce Server 2007
Peter,
The Commerce Server Analytics packaged with the installation contains a few reports to determine product popularity, but I don't know the complete level of detail for these reports.
Specifically, I think the report for product popularity only lists the product popularity with respect to every other product on the site. I don't think it has logic to see what popular cross-sells are present on the site, and I think these metrics are basically gathered up by importing the PurchaseOrder information to the DWA system.
I know of nothing that programmatically allows cross-sell functionality at run time based on popularity, and I think this would likely be custom code. This is definately functionality I'd like to use in a lot of projects, so we should probably discuss best practices for implementing this system.
I envision this sort of thing as being very similiar to the inventory system, where popularity is updated by pipeline components during the checkout process, and the actual popularity values are maintained as a seperate table in the Product Catalog database. What sort of functionality would you like to see out of this sort of thing
If I understood the question right, you are looking for a "best seller" list within a period of time.
Colin's method certainly works directly against the database. Just be aware that the tables are used for online production purposes, so you'll want to avoid running the script at peak times (e.g. schedule it for a nightly run at off peak time).
Additionally as Joseph hinted. There is a Product Sales report available that you can run. You'll need to run the Data Warehouse import first, and then view the report (it's parameterized so you can specify the date range). This method is good for viewing the best seller list but requires a bit more work to convert into a list for pumping back into the product catalog (as product attributes), or simply a text file that you can render as HTML online.
Thanks, Caesar.