Flexi as downloads component?

More
8 years 4 days ago - 7 years 11 months ago #61727 by lipatovroman
Yes, it works perfect. I'm very very glad, that you understand me :cheer:
But, in this case I can't sort (order) items by this parameter (sum of downloads).

You wrote about this. About text field with downlooads sum.



So, I tried to make code which sends +1 to this field each time user press download button. But it does not work...
Last edit: 7 years 11 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #61882 by ggppdk
Hello

so what do you suggest ?

adding a new ordering option for the items listing (=category view) ?

that
- will join with the files table calculate a sum of download for every item
- and then order items by it ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago - 7 years 11 months ago #61890 by lipatovroman

that
- will join with the files table calculate a sum of download for every item
- and then order items by it ?


It will be great, but I have no right to ask you about this.

Right now I ask for help me to make code, that adds +1 to text extra field.

Explain.

I have created 2 fields



Now I need to inscrease text field "Total downloads" on +1 each time user download any file from File filed.




I tried to write code for this , but I'm not programmer and it does not work..

P.S. There are many downloads components, but I want to create site on FC.
The main requirements to the site - the ability to sort items by ratings, hits and number of downloads.

Problem only in number of downloads, but we can solve this using text extra field that increases after downloading files.
Last edit: 7 years 11 months ago by lipatovroman.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #61892 by ggppdk
Hello

(i think) no DB schema changes would be needed for this
- propably it is only needs join with the "flexicontent_files" an SQL aggregation (1 more case in the ordering clause)

it seems to be similar to the "Most rated" order and with similar performance cost ...

(please note that biggest cost of category view SQL is the ORDER clause, so adding a new ordering is not to be taken lightly)
e.g. i estimate that this can add 0.5 seconds if the current category view has 10,000 content items to our optimized SQL query for category view items

if it is like i suspect in both terms of little work to add and with similar performance as "Most rated",
- then will add 1 more ordering option "Most downloaded" in v3.0.15

github.com/FLEXIcontent/flexicontent-cck/issues/538


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #61894 by lipatovroman
When you plan to present v3.0.15 ?
Most downloaded order should be based on sum of all files attached to the item.
Thanks!

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #61926 by ggppdk
Hello

i looked at it , found how to modify SQL query in an optimized way to support this, it seems to work
- it should not have any performance degrade on large listing (10,000 items categories) :)

will be in v3.0.15, but i will give you package to test this before release (that is the least you should do on your side)

both supporting
- a new category default order "Most downloads" + new parameter "Select File field"
- also support in the frontend ORDERING selector


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.284 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline