summaryrefslogtreecommitdiffstats
path: root/template/en/default/search
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/search')
-rw-r--r--template/en/default/search/field.html.tmpl15
1 files changed, 13 insertions, 2 deletions
diff --git a/template/en/default/search/field.html.tmpl b/template/en/default/search/field.html.tmpl
index 34a480f31..ab7380857 100644
--- a/template/en/default/search/field.html.tmpl
+++ b/template/en/default/search/field.html.tmpl
@@ -158,10 +158,21 @@
});
[% SET sub_field = value_controllers.${field.name}.$accessor %]
+ [% SET prod_per_class = {} %]
+ [% IF field.name == "classification" %]
+ [% FOREACH p = product %]
+ [% prod_per_class.${p.classification_id}.${p.id} = 1 %]
+ [% END %]
+ [% END %]
+
[% FOREACH legal_value = legal_values %]
[% SET controlled_ids = [] %]
- [% FOREACH sub_value = legal_value.$accessor %]
- [% controlled_ids.push(sub_value.id) %]
+ [% IF field.name == "classification" %]
+ [% controlled_ids = prod_per_class.${legal_value.id}.keys %]
+ [% ELSE %]
+ [% FOREACH sub_value = legal_value.$accessor %]
+ [% controlled_ids.push(sub_value.id) %]
+ [% END %]
[% END %]
[% NEXT IF !controlled_ids.size %]
showValueWhen('[% sub_field.name FILTER js %]',