[SOLVED] Templating : modify $this->items

More
10 years 3 months ago #52982 by juansolos
Not a query for a field.

As explain, in this post
<!-- l --><a class="postlink-local" href=" www.flexicontent.org/phpbb/viewtopic.php?f=9&t=8824&start=10 ">viewtopic.php?f=9&t=8824&start=10

I try to find owner depending filtering their product.
The group field is fine to creat products in the owner's item but group field is not filtering.

So my solution is to creat 2 items types. Product and owner. And a field relation.

So i filter on product page and display only the relation field, it is fine i get owner infos.
But of course if several products from the same owner appear. I get several time the same owner on the page.

I can change this, with modification on the "$this->items" in the category view (don't display the item if i have an item with the same relation field value)
But the next problem is to have results ad pagination depending my new "$this->items".

It should be better to add directly somethng on the main sql query.

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

More
10 years 3 months ago #52984 by ggppdk
Hello

-- a field participating in a group can be displayed as a filter,

what is the implicit relation about fields in group field that you mean, in regards to filtering ?


-- 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
10 years 3 months ago #52985 by juansolos
Yes i would like to combine filter.

Field group with a field size and a field color

If i set 2 filters : big for size and blue for color.

I get all results with this value but not for the same group.

Example :
item 1
Field group : big - white

item 2
Field group : small - blue

Filtering on big- blue give me item 2 et item 1.

group field is not filtering.
Do you anderstand what i explain?

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

More
10 years 3 months ago #52990 by ggppdk
Hello

e.g. when you filter you get items
- with color: red
- with size: 10

-- you will get items that have this color and this size inside the same field group !
(provide you are only using field inside a group)

since all filters are "required" filters do a logical AND and not a logical OR

-- and you should not use fields in fieldgroup only inside the group, e.g. don't use them outside the group in some other item types


-- 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
10 years 3 months ago #52991 by juansolos
Yes but my group field is mutli valued.
so each article has several value for the group field (let set a thrid field in this group field : product) so the group field is a product description (size, type of product, color) and items the owner

Item1
big blue shoes
big white pen


item2
big red pen
big white hat
small black pen


filter on small white pen will return all item with small and white and pen so item 1 and 2.
But i would like to return all items that have white small pen for a field group value. (in my exemple no result)

Maybe have i done a wrong test?

That why i creat 2 item types.
Do you anderstand my problem?

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

More
10 years 3 months ago #52993 by ggppdk
Hello

yes,
it will not work in the case of a multi-value field group

the filtering needs to be updated, in the case of a "field group" we should also match the same "value_order" column in the field values table
-- although it is not obvious on how to do this

we will probably need
-- find which filters are in same field and add them in an extra subquery or join


-- 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.399 seconds
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
Save