Hot category item lists are not sorted by Hits field descending

0 views
Skip to first unread message

Alexander Obuhovich

unread,
Jan 15, 2010, 10:49:36 AM1/15/10
to In-Portal Bugs
Hot category item lists is not sorted by Hits field descending. Also we should hide sorting dropdown on such type lists.

--
Best Regards,

http://www.in-portal.org
http://www.alex-time.com

Dmitry A.

unread,
Jan 15, 2010, 11:05:45 AM1/15/10
to In-Portal Bugs Team
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?

DA.

Alexander Obuhovich

unread,
Jan 15, 2010, 1:51:04 PM1/15/10
to in-port...@googlegroups.com
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.


--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.



Alexander Obuhovich

unread,
Jan 21, 2010, 8:27:37 AM1/21/10
to in-port...@googlegroups.com
Hi again, anyone, please help.
--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Alexander Obuhovich

unread,
Jan 25, 2010, 8:36:06 AM1/25/10
to in-port...@googlegroups.com
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).

Dmitry A.

unread,
Jan 25, 2010, 12:05:03 PM1/25/10
to In-Portal Bugs Team
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
operants):

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 '.
$click_field.' DESC LIMIT '.$last_hot.', 1';

where:
'MaxHotNumber' => 'Product_MaxHotNumber', // maximum number of HOT
(top seller) items AND is what you are changing threshold stored in
Cache.
$click_field => Hits field of the Product

The logic of this the following - Get me the Hits field of the
Products which is counted as N when we Order by Hits and this will be
our Hits


In other words, Hot is using Hits field which is actually is updated
in "function InventoryAction(&$event)" of Order_Event_Handler.php
whenever Order Status manipulations are performed - Approved in
Particular.

Let me know if this helps.


DA.

On Jan 25, 7:36 am, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> 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).
>

> On Thu, Jan 21, 2010 at 3:27 PM, Alexander Obuhovich <aik.b...@gmail.com>wrote:
>
>
>
>
>
> > Hi again, anyone, please help.
>

> > On Fri, Jan 15, 2010 at 8:51 PM, Alexander Obuhovich <aik.b...@gmail.com>wrote:
>
> >> 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.
>

> >> On Fri, Jan 15, 2010 at 6:05 PM, Dmitry A. <dandre...@gmail.com> wrote:
>
> >>> 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?
>
> >>> DA.
>
> >>> On Jan 15, 9:49 am, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> >>> > Hot category item lists is not sorted by Hits field descending. Also we
> >>> > should hide sorting dropdown on such type lists.
>
> >>> > --
> >>> > Best Regards,
>
> >>> >http://www.in-portal.orghttp://www.alex-time.com
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "In-Portal Bugs Team" group.
> >>> To post to this group, send email to in-port...@googlegroups.com.
> >>> To unsubscribe from this group, send email to

> >>> in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsubscribe@go oglegroups.com>

Alexander Obuhovich

unread,
Jan 26, 2010, 4:36:27 AM1/26/10
to in-port...@googlegroups.com
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.

To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.




--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Dmitry A.

unread,
Jan 26, 2010, 10:43:01 AM1/26/10
to In-Portal Bugs Team
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 '.
$click_field.' DESC LIMIT '.$last_hot.', 1';


Let me know if it makes sense now.


DA.

> http://www.in-portal.comhttp://www.alex-time.com

Alexander Obuhovich

unread,
Jan 26, 2010, 10:52:33 AM1/26/10
to in-port...@googlegroups.com
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.

To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.




--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Alexander Obuhovich

unread,
Feb 20, 2010, 6:23:45 AM2/20/10
to in-port...@googlegroups.com
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?

Alexander Obuhovich

unread,
Mar 27, 2010, 6:12:08 PM3/27/10
to in-port...@googlegroups.com
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.

Phil ..:: domicilis.biz ::..

unread,
Mar 27, 2010, 6:53:01 PM3/27/10
to in-port...@googlegroups.com
"Qty sold" would be also very usefull for stats :)

2010/3/27 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Mar 27, 2010, 7:16:46 PM3/27/10
to in-port...@googlegroups.com
That stats is in Hits field in database, but label is translated as "Qty Sold" on product editing general tab :)

Phil ..:: domicilis.biz ::..

unread,
Mar 27, 2010, 7:18:46 PM3/27/10
to in-port...@googlegroups.com
:)

2010/3/28 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Mar 27, 2010, 7:26:35 PM3/27/10
to in-port...@googlegroups.com

Dmitry Andrejev

unread,
Mar 27, 2010, 11:42:46 PM3/27/10
to in-port...@googlegroups.com
I am all for your solution!

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

DA.

Alexander Obuhovich

unread,
Mar 28, 2010, 7:16:42 AM3/28/10
to in-port...@googlegroups.com
This is exactly what I've proposed.
Reply all
Reply to author
Forward
0 new messages