dropdown for product variant picker

main
alexanderroese 2024-07-13 15:54:14 +02:00
parent 5d8d48b29b
commit a0f1e26e76
1 changed files with 13 additions and 11 deletions

View File

@ -41,22 +41,24 @@
%}
<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>
<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>
<div class="field custom">
<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>
</div>
{% endif %}
{%- if picker_type == 'swatch' -%}