Skip to main content

Checking the fixed choice multiple choice attribute in the `attributes` parameter in the product snippet tag

Description

There is a need to add the ability to check whether the given value is in the Fixed Choice product attribute with allow_multiple_choices: true, for the attributes parameter, in the product snippet tag.

Example

For a Fixed Choice product attribute (with allow_multiple_choices: true) named ca_fixed_multiple and options ["1", "2"], the following snippet will not work:

{% products count=15 attributes='ca_fixed_multiple=2' order_by='id' order=1 as product_list %}{% for product in product_list %}(...){% end for %}

although there are products that meet this condition.

To-do

Check whether a Fixed Choice product attribute with allow_multiple_choices: true has a given value.

Condition attributes='ca_fixed_multiple=2' is supposed to work similar to

{% if '2' in ca_fixed_multiple %}
Status: Completed

Log in to comment and vote

No comments yet

Be the first to share your thoughts.