Child pages
  • [in-commerce] Hot category item lists are not sorted by Hits field descending
Skip to end of metadata
Go to start of metadata

Imported From:

Hot category item lists is not sorted by Hits field descending. Also we should hide sorting dropdown on such type lists.

Related Tasks

MINC-55 - Getting issue details... STATUS


  1. I actually thought we are showing there all Categories or Items with
    number of Hits that exceeds the minimum to be considered as "Hot" item
    and then Sorting option stays so I can sort of manage them?


  2. By the way all hot/top seller functionality seems to be broken. For example
    if I have 100 products and 50 of them were brought 5 to 10 times and other
    50 were not brought at all. And I want to show all products, that were
    brought at least one time, then what should be that hot item threshold value
    in administrative console?

    I set this to 1, so I thought this will give me all products with Hits value
    more or equals to one, but instead I got only products with maximal Hits
    value through all of the products. Setting threshold to 1000 resulted in
    showing all products no matter of it's Hits field value.

    How can I get what I want? Maybe hot functionality is broken or it's just
    not supposed to do what I what to gain.

  3. Hi again, anyone, please help.

  4. How this really works, or is this on error. Please respond. It's been almost
    2 weeks since last response (not counting mine of course).

  5. Hi Alex,

    First of all sorry for delay with getting back to you. Please find the
    logic (as we have it now) attached below:

    1. Hot Items

    a. We get "Threshold" from Cache table (or calculate it if empty).
    Cache updated every hour.
    b. We add "IsHot" calculated field with the following logic (MySQL

    IF(%1$s.'.$property_map['ClickField'].' >= '.$hot_limit.', 1, 0)

    Where $property_map['ClickField'] would be "Hits" field for the
    Products, and $hot_limit is what we get from Cache.

    c. $hot_limit is Threshold and stored in Cache as described in a) and
    calculated as:

    $last_hot = $this->Application->ConfigValue($property_map
    ['MaxHotNumber']) - 1;
    $sql = 'SELECT '.$click_field.' FROM '.$this->Application-

    >getUnitOption($event->Prefix, 'TableName').' ORDER BY '.

  6. Code explanation is good, but I can read that code myself. I don't
    understand what it does logically. For example if I have 6 products with
    such values of Hits field: 1, 2, 3, 3, 5, 0 and I have set that threshold to
    0. In such case what products of mentioned will be shown and why (please
    describe in words, not in code). Same with what if I set threshold to 3.

    As I've understand threshold term itself, then it should be minimal value of
    Hits field to count such product as "hot"/"top seller". But it works somehow
    different here, so please describe.

  7. Okay, sorry for confusion...

    I'll try to explain verbally below:

    First of all 0 is a bad example, let's take 1 as your threshold.

    a. If you have your Threshold set to 1 system will take one Product
    with the HIGHEST Hits number (among others) and will consider that
    Hits number as a threshold when marking products Hot or not.

    b. If you have your Threshold set to 3 system will take one product
    with the 3rd HIGHEST Hits number (among others) and will consider that
    Hits number as a threshold when marking products Hot or not.

    I think there might be a better results if we GROUP BY Hits number
    when getting the Hits threshold in this formula:

    $sql = 'SELECT '.$click_field.' FROM '.$this->Application-

    >getUnitOption($event->Prefix, 'TableName').' ORDER BY '.

  8. If I have 5 products in database and set treshhold to 10, then it will take
    10th product Hits field value and show none of the products. It's very
    tricky formula then. So back to my original post. Isn't top seller products
    the ones, that are sold at all (Hits > 0) or are sold at least in N qty
    (e.g. Hits > N).

    What you've explained maybe is hot category item detection (items, that are
    viewed most), but in no case if algorithm for detecting top seller products.
    Also most viewed items are items, who have view count greater, then
    specified, not some kind related to N-th category item in database.

  9. It looks like we have stuck with what we have. Can you please answer is what
    I ask really so hard to understand. I suspect, that current implementation
    of hot item detection stuff is a bit incorrect and don't try to explain the
    code for me, because it doesn't mean it is correct.

    Back to my original question: isn't hot items (at least for products)
    supposed to display most sold products?

  10. Looks like I have discussion with myself for now, so here is my new post:

    I propose to create "QtySold" for products and update it instead of "Hits"
    field. Then we should use Hits field for counting how much users are
    visiting product detail page (as it works for link detail page for now).
    Then we'll create new "top_seller" value for "types" parameter (usage:
    <inp2:p_PrintList render_as="top_seller_element" types="top_seller"
    parent_cat_id="any"/>) which will list only products, that were sold at all.
    Default sorting for such product list will be: most sold on top with user
    unable to change it of course.

  11. "Qty sold" would be also very usefull for stats :)

    2010/3/27 Alexander Obuhovich <>

  12. That stats is in Hits field in database, but label is translated as "Qty
    Sold" on product editing general tab :)

    On Sun, Mar 28, 2010 at 12:53 AM, Phil ..:: ::.. <

  13. :)

    2010/3/28 Alexander Obuhovich <>

  14. Here is the task:

    MINC-55 - Getting issue details... STATUS

    On Sun, Mar 28, 2010 at 1:18 AM, Phil ..:: ::.. <

  15. I am all for your solution!

    My guess we need to keep Hits as well and make appropriate changes to the
    Admin templates


  16. This is exactly what I've proposed.