[SOLVED] mod_flexicontent category scope behaviour is ANY category, without option to configure REQUIRE ALL

More
8 years 1 month ago #61036 by fortino
Looks there's some issue.
I have two module both with a dynamic category [the same] and a static category [different]. They show the same items and this is not right.

I'm debugging right now.
I'll give you more infos soon.

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

More
8 years 1 month ago - 8 years 1 month ago #61039 by fortino
oook, after a day I figure out [mostly] what's going on.

the helper of this module doesn't merge STATIC and DYNAMIC categories.

As I said before I need to put in AND one static cat and one dynamic cat.

I found out a working solution:

helper.php, line 1070 :
Code:
if ($behaviour_cat == 1 || $behaviour_cat == 3) { if (!$apply_config_per_category) { $where .= ' AND c.id IN (' . implode(',', $catids_arr) . ')'; } else {
replace with this:
Code:
if ($behaviour_cat == 1 || $behaviour_cat == 3) { /* SG MOD */ if ((!$apply_config_per_category)&&($cat_combine)){ $catids_arr = array_merge($catids_arr, $catids); $where .= ' AND i.id IN (' .' SELECT DISTINCT itemid' .' FROM #__flexicontent_cats_item_relations' .' WHERE catid IN ('.implode(',', $catids_arr).')' .' GROUP by itemid HAVING COUNT(*) >= '.count($catids_arr) .')' ; /* END SG MOD */ } else if(!$apply_config_per_category){ $where .= ' AND c.id IN (' . implode(',', $catids_arr) . ')'; } else {
Sorry if it's not the most elegant solution, I need more time to understand 100% the helper .
Last edit: 8 years 1 month ago by fortino.

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

More
8 years 1 month ago #61384 by fortino
Well, this issue is in the component too, just found out trying to have a multicategories view, not only the module.

One thing: the module isn't merging the dynamic and static categories... is my solution [last post] good enough?

Thank you

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

More
8 years 1 month ago #61386 by ggppdk
Question

1. trying to keep a balance of making powerful, but not too difficult to configure,

2. what is the percentage of web-sites or of a administrator of a set of web-sites that will use this ?

so do you still think it should be added ?


-- 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
8 years 4 weeks ago - 8 years 4 weeks ago #61423 by fortino
I honestly think Flexicontent is already quite difficult to configure... But that's not a real problem, it's a really fantastic and powerful tool and some knowledge is obviously required. [My experience told me that sometimes I need to open the code to understand what some params are supposed to do]

My opinion is:
- for multicategories views, module or component, my expectation is to have by default a "AND" logic behind it. If I choose 3 categories I hope to have items with ALL the 3 categories, not just one of them.
Maybe it's me... but I think an option about it's really needed.

- same exact thing is about merging the dynamic and static categories. "require all of them? yes/no"?

Basically it's all about adding a button with "require all the categories" in every case you can choose more than one category to view items.
I won't consider strange cases or more complex cases because I agree it would be a real nightmare to "explain" and make usable the component.

Pay attenttion that actually Flexicontent is the only, or at lest the best, component to have a very good management about multicategories and I think this can be a real improvement.

thanks for your question and consideration
Last edit: 8 years 4 weeks ago by fortino.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.285 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