How can I enable multi-variant filtering with checkbox filters?

Gobiha
Visitor
3 0 0

i have add the code for tag filtering , only work with single type of variant at the time. need to add multi variant filter.

I have added below code here:

Any solutions available?

      <table>
        						<div class="row_f" style="border-bottom: solid 1px #868788; background-color: #f0f0f0;">
        							<div class="column_f" style="width: 50%;">BASE</div>
        						</div>
        					</table> 
            				<div  class="cont_desc"  id="demo3content">            
                                    <ul class="filter-group-display__list" style="display:block!important;">
                                      {%- for filter_value in filter.values -%}
                                           {% assign some = filter_value.label | slice:0,4 %}
                                            {% assign total_length = filter_value.label | size %}
                                            {% assign some_tag = filter_value.label | slice:4,total_length %}
                                             {% if some == "BASE" %}
                                            <li class="filter-group-display__list-item" >
                                              <label for="Filter-{{ filter.param_name }}-{{ forloop.index }}" class="selection">
                                                <input type="checkbox" class="input-check selection"
                                                name="{{ filter_value.param_name }}"
                                                value="{{ filter_value.value }}"
                                                id="Filter-{{ filter.param_name }}-{{ forloop.index }}"
                                                {% if filter_value.active -%}checked{%- endif %}
                                                {% if filter_value.count == 0 and filter_value.active == false -%}disabled{%- endif %}
                                              onclick="submit(event)">  {{ some_tag }}
                                             </label>
                                            </li>
                                           {% endif %}
                                      {%- endfor -%}
                                    </ul> 
            				 </div>
    						
        					<div class="row_f" style="border-bottom: solid 1px #868788; background-color: #f0f0f0;">
        						<div class="column_f" style=" width: 50%;">WATT</div>
        					</div>
        					<div class="cont_desc"  id="democontent">

                                   <ul class="filter-group-display__list" style="display:block!important;">
                                      {%- for filter_value in filter.values -%}
                                           {% assign some = filter_value.label | slice:0,4 %}
                                            {% assign total_length = filter_value.label | size %}
                                            {% assign some_tag = filter_value.label | slice:4,total_length %}
                                             {% if some == "WATT" %}
                                            <li class="filter-group-display__list-item" >
                                              <label for="Filter-{{ filter.param_name }}-{{ forloop.index }}" class="selection">
                                                <input type="checkbox" class="input-check selection"
                                                name="{{ filter_value.param_name }}"
                                                value="{{ filter_value.value }}"
                                                id="Filter-{{ filter.param_name }}-{{ forloop.index }}"
                                                {% if filter_value.active -%}checked{%- endif %}
                                                {% if filter_value.count == 0 and filter_value.active == false -%}disabled{%- endif %}
                                                onclick="submit(event)">  {{ some_tag }}
                                             </label>
                                            </li>
                                           {% endif %}
                                      {%- endfor -%}
                                    </ul>   
        						  </div>
        				

  

Replies 0 (0)