[DCom] Custom Fields Extend

[DCom] Custom Fields Extend [Paid] 1.3.2

No permission to buy ($20.00)
Almost finished.
Just my 2 cents, but I would not use the Display location "Self placement" to control whether a filter displays or not. Instead, use the Display field on list option as that would make the most sense, since the filters are on Index and Category pages, so displaying those fields on listing pages, would make sense to also display filters for them.

One of the main use cases for the the Display location "Self placement" is to NOT display those fields anywhere, so admins wouldn't want those fields to be automatically exposed as Filters. Hope that makes sense :)
 
Just my 2 cents, but I would not use the Display location "Self placement" to control whether a filter displays or not. Instead, use the Display field on list option as that would make the most sense, since the filters are on Index and Category pages, so displaying those fields on listing pages, would make sense to also display filters for them.

One of the main use cases for the the Display location "Self placement" is to NOT display those fields anywhere, so admins wouldn't want those fields to be automatically exposed as Filters. Hope that makes sense :)
I tried different options and decided to add an additional field in the "Field" entity and add a filter to the "DefinitionSet" so as not to depend on being on the Index or Category pages.
 
With a few tweaks this installed and is running great on my 2.2 install - thanks so much @DimmmCom for this add on.

I've been wanting to filter Showcase items since forever :)

One feature request would be for it to respect the display order of the custom fields, at the moment they just seem to be random.

1743183515062.webp
 
Feature request for additional field types:
Text field (using LIKE)
Number field (range)
Just to clarify, are we talking about searching by existing types of custom fields or are you asking to add new types of custom fields?
 
Just to clarify, are we talking about searching by existing types of custom fields or are you asking to add new types of custom fields?
Yes, existing types :)

I would like to be able to filter (not only index) on Single-line and Multi-line text boxes.

And it uses the Value match requirements of the text box to adjust the filter.

For example, if just a normal text box, then the filter should just do a like comparison.
But if the textbox is a Number, then it should allow entering a range (so two inputs - Mix and Max)

That would be great for classifieds threads - we could filter all items between $100 and $300 etc etc
 
Thank you for the update, but we got a few small issues.

1) The min/max filter doesn't work properly - if you fill in both min and max, it seems to only use the min, which then returns all items.

Min: 3 - Max: 3

I would expect to only get results of number 3, but instead I get results for number 5 as well.

But if I do Min 5 Max 5 - I correctly only get number 5.

Having a look at the code, I think the Min Max part should be like this instead:

PHP:
elseif (array_key_exists('min', $filter) || array_key_exists('max', $filter)) {
    if (array_key_exists('min', $filter)) {
        $itemFinder->where('CustomFields|' . $fieldId . '.field_value', '>=', $filter['min']);
    }
    if (array_key_exists('max', $filter)) {
        $itemFinder->where('CustomFields|' . $fieldId . '.field_value', '<=', $filter['max']);
    }
}

2) The text input field needs an exact match to find anything, which isn't very useful.

Example field: Engine 1.6 SX

I would expect "1.6" or "SX" to show that record, but it doesn't. Only if I enter the full text "Engine 1.6 SX"
 
Last edited:
2) The text input field needs an exact match to find anything, which isn't very useful.

Example field: Engine 1.6 SX

I would expect "1.6" or "SX" to show that record, but it doesn't. Only if I enter the full text "Engine 1.6 SX"
I'll think about how to implement it better and add it in the next version.
 
Back
Top Bottom