Update popularity rating

Hi,

We have over 4k products and I need to reset the popularity rating to “1”. The only way i know is to do a batch process but i have to do it about 40 times since the max for batch edit is 100 products. Is there an easier way? unfortunately im not good with SQL

Product Popularity includes a TOTAL numeric value that is a sum of 4 different product activities:

  1. Views = value +3
  2. Added (to cart) = value +5
  3. Deleted (from cart) = -5
  4. Bought = +10



    So you should probably reset to 0, as there is no actual way to total to 1. The minimum value over zero is 3 (one view).



    A SQL query could do this:



    UPDATE cscart_product_popularity SET viewed='0',added='0',deleted='0',bought='0',total='0'



    And it's interesting that Bought = 10, but since you can't buy unless you add to cart, any purchased item actually has its popularity increased by 15 per purchase (worth 5 times 1 view).



    Also, if you edit the URL of your browser and change the &items_per_page=100 to &items_per_page=4000 - you can get them all on one page - unless your browser crashes. Just change the quantity per page once and the process puts the name/value pair in the URL - then you can just change the number.

[quote name=‘Magpie Don’ timestamp=‘1379530231’ post=‘168402’]

Product Popularity includes a TOTAL numeric value that is a sum of 4 different product activities:

  1. Views = value +3
  2. Added (to cart) = value +5
  3. Deleted (from cart) = -5
  4. Bought = +10



    So you should probably reset to 0, as there is no actual way to total to 1. The minimum value over zero is 3 (one view).



    A SQL query could do this:



    UPDATE cscart_product_popularity SET viewed=‘0’,added=‘0’,deleted=‘0’,bought=‘0’,total=‘0’



    And it’s interesting that Bought = 10, but since you can’t buy unless you add to cart, any purchased item actually has its popularity increased by 15 per purchase (worth 5 times 1 view).



    Also, if you edit the URL of your browser and change the &items_per_page=100 to &items_per_page=4000 - you can get them all on one page - unless your browser crashes. Just change the quantity per page once and the process puts the name/value pair in the URL - then you can just change the number.

    [/quote]

    Thank you! that worked :)