dropdown for product variant picker

main
alexanderroese 2024-07-13 23:33:06 +02:00
parent e95ab7d16c
commit aa610afacb
1 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@
{% if shx_current_page contains "texte" %}
<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>
<style>
@ -139,7 +139,8 @@
{% endfor %}
</select>
{% comment %}
<h1>{{ option.selected_value }}</h1>
<button class="shx-custom-dropbtn" id="shx-custom-selected">
<div style="display: flex; justify-content: space-between; align-items: center; pointer-events: none">
<span id="shx-custom-selected-value">Produktvariante auswählen</span>
@ -148,7 +149,7 @@
</button>
<div class="shx-custom-dropdown-content" id="shx-custom-dropdown-content">
{% for product_variant in product.variants %}
<div data-value="{{ product_variant.title }}">
<div data-value="{{ product_variant.title }}" {% if option.selected_value == product_variant.title %}class="shx-custom-selected-variant"{% endif %}>
<img src="{{ product_variant.featured_image.src | image_url }}" height="100" width="100" style="border-radius: 4px">
<div style="display: flex; justify-content: space-between; align-items: center; width: 100%">
@ -158,7 +159,6 @@
</div>
{% endfor %}
</div>
{% endcomment %}
</div>
<script>