CMS MADE SIMPLE FORGE

Products

 

[#10433] filter by custom fields not working

avatar
Created By: Stephan (10010110)
Date Submitted: Thu Feb 26 08:46:04 -0500 2015

Assigned To: Robert Campbell (calguy1000)
Version: 2.22.1
CMSMS Version: 1.11.12
Severity: Major
Resolution: None
State: Open
Summary:
filter by custom fields not working
Detailed Description:
OK, either the module help/documentation is unclear or this is actually not
working: I’m trying to show only products (in summary view) that have a certain
custom field value. Let’s say I have a text input with name “product_type” and
specified “my_value” in one of the products. I’m calling the module with:

{Products field="product_type" fieldval="my_value"}

and I would expect one product to be shown, yet, there is no change to the
default setting (without parameters), i. e. all products are shown. Likewise,
nothing happens if I write

{Products field="product_type" fieldval="::null::"}

…or any of the special values.

Plus, the help text is inconsistent, as it reads:

(optional) field="" - Used in the fieldlist and the ajax_propval actions. […]
(optional) fieldval="" - Used in the default and ajax_propval actions, […]

So, something isn’t right, here. Is it a bug or is it just not a feature?


History

Comments
avatar
Date: 2015-08-13 04:38
Posted By: Daan Aikema (Ertenal)

Stephen,

The field parameter is only used in the fieldlist action. You need the fieldid
parameter. This points to the field id of the field. Like this:

{Products fieldid="1" fieldval="my_value"}

Hope it helps!