You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue propose to add a filter interpreter parameter in e-commerce yaml config to associate to an attribut, some thing like:
myAttribut:
type: varchar(190)
filter_group: string
filter_interpreter: Path\To\MyInterpreterClass <= this is the new setting proposed in this issue
The pupose of this interpreter will be to be able to customize the displaying filters values for this attribut.
Sometimes we want to index in store database some values (let's say an ID for instance) but for the filters we want to get the object and display a specific fields or data reformated during filter html generation, aka to set label to custom values, etc.
I think it could be a valuable tool. Actually we need to check the type of attribut and modifying the labels directly in custom filter-select.html file for instance finishing in hard to maintain code because having all the labels logics in the filter html file.
Having the possibility to define a filter interpreter directly at the attribut level would be more clean and reusable (instead to patch all filters which could be using this attribut for instance, it will be only needed to set a filter_interpreter at the attribut level).
Best regards.
The text was updated successfully, but these errors were encountered:
Thanks a lot for reporting the issue. The issue was not considered by us as "Priority" or "Backlog", so we're not gonna work on that anytime soon. In case this is a bug report, please create a pull request fixing the issue, we'll then review it as soon as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request, we'll then decide whether we'd accept it or not. Thanks for your understanding.
brusch
changed the title
New feature - Ecommerce filter interpreter at the attribut level
Ecommerce filter interpreter at the attribut level
May 31, 2023
Hello,
This issue propose to add a filter interpreter parameter in e-commerce yaml config to associate to an attribut, some thing like:
The pupose of this interpreter will be to be able to customize the displaying filters values for this attribut.
Sometimes we want to index in store database some values (let's say an ID for instance) but for the filters we want to get the object and display a specific fields or data reformated during filter html generation, aka to set label to custom values, etc.
I think it could be a valuable tool. Actually we need to check the type of attribut and modifying the labels directly in custom filter-select.html file for instance finishing in hard to maintain code because having all the labels logics in the filter html file.
Having the possibility to define a filter interpreter directly at the attribut level would be more clean and reusable (instead to patch all filters which could be using this attribut for instance, it will be only needed to set a filter_interpreter at the attribut level).
Best regards.
The text was updated successfully, but these errors were encountered: