DA.
--
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.
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>
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
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
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.