Price Tapestry top 10 viewed...

I've been spending a bit of time recently working on creating a top 10 viewed items for Price Tapestry. So far, what I have stores the data into the products table counting the amount of times that a product is clicked on and viewed. There is two problems with this though. One is that to get the top 10 items the whole products database needs to be loaded and when you have well over fifteen thousand products on the site this can take a bit of time. It's only a few seconds, but when the rest of the site is loaded instantly it doesn't look good that this takes longer. The second problem, and the most important one, is that when you update a data feed you lose the count information as the whole row gets reset for the updated data feed. 

The solution that I am working on is adding this to another table and pulling all of the data into a new database when a product is clicked on. This way the database will be much smaller as the chances of people clicking on all of the products is slim, or at least is for a quite a while. When a product is clicked on I need it to look to see if the product is already listed in the new Viewed table. If it is, then it needs to add to the counter. If the product isn't in the table then I need to add it with a one in the viewed box. This should speed up the viewing of the top viewed list and also prevent items from disappearing when a product feed is updated.

Hopefully it won't be too much work to do along side working on a new site but as this would be a good feature to have on it I should get cracking.

0 Comments

Please insert the result of the arithmetical operation from the following image:

Please insert the result of the arithmetical operation from this image. =