Modification in Product theme.

shyam2021
Tourist
3 0 1

we have a store in that we have different products of course . There are different courses on the web page and each courses consiting drop down field and add_to_cart button.

These courses are displayed on web pages , in theme it is forloop for displaying courses on web pages and each courses consisting of field like name ,type and location , this is also by forloop. How could i add extra field in the forloop. i have tried to use outside the loop it is not working.want to add date selection from calender.

Please can i get a solution.

Please send your for loop code or you can share your  Website link with theme details.   

0 Likes
shyam2021
Tourist
3 0 1


{%- unless product.has_only_default_variant -%}
{%- for option in product.options_with_values -%}
<div class="product-form__select form__input-wrapper form__input-wrapper--select">
<label class="product-form__select-label form__select-label" for="Option-{{ section_id }}-{{ forloop.index0 }}">

{{ option.name }}

</label>


<select
id="Option-{{ section_id }}-{{ forloop.index0 }}"
class="form__input form__input--select"
style="background-image: url({{ 'icon-select.svg' | asset_url }});"
name="options[{{ option.name | escape }}]"
data-product-option
>'
{% for value in option.values %}
<option
value="{{ value | escape }}"
{% if option.selected_value == value %}selected="selected"{% endif %}>
{{ value }}
</option>

{% endfor %}

</select>

</div>

{%- endfor -%}

{%- endunless -%}

 

12.PNG

Want to add datepicker in this loop, which is below location option. 

 

 

0 Likes