dropdown for product variant picker

main
alexanderroese 2024-07-13 15:45:31 +02:00
parent 92b5e77472
commit e08769f425
1 changed files with 11 additions and 4 deletions

View File

@ -41,15 +41,22 @@
%}
<script>
console.log("1 product variant", "{{ picker_type }}", {{ product | json }}, {{ shx_current_page }})
console.log("2 product variant", "{{ picker_type }}", {{ product | json }}, {{ shx_current_page }})
</script>
{% if shx_current_page contains "texte" %}
<h3>Texte Dropdown</h3>
{% for product_variant in product.variants %}
<span>{{ product_variant.title }}</span>
{% endfor %}
<select
id="Option-{{ section.id }}-{{ forloop.index0 }}"
class="select__select"
name="options[{{ option.name | escape }}]"
form="{{ product_form_id }}"
>
{% for product_variant in product.variants %}
<option value="{{ product_variant.title }}">{{ product_variant.title }}</option>
{% endfor %}
</select>
{% endif %}
{%- if picker_type == 'swatch' -%}