dropdown for product variant picker
parent
a311b18c8d
commit
ed9ac3da1e
|
@ -41,10 +41,6 @@
|
|||
%}
|
||||
|
||||
{% if shx_current_page contains "texte" %}
|
||||
<script>
|
||||
console.log("3 product variant", "{{ picker_type }}", {{ product | json }}, {{ shx_current_page }})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* Custom dropdown button styling */
|
||||
.shx-custom-dropdown {
|
||||
|
@ -171,8 +167,6 @@
|
|||
event.currentTarget.classList.add('shx-custom-selected-variant');
|
||||
|
||||
dropdownContent.style.display = 'none';
|
||||
console.log('Selected variant:', selectedVariant);
|
||||
// Additional code to handle the selected variant can go here
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -184,22 +178,6 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Set the initial value when the page loads
|
||||
/* window.addEventListener('load', function() {
|
||||
const selectedValue = selectElement.value;
|
||||
// customSelectedValue.innerText = selectedValue;
|
||||
|
||||
console.log("load", selectedValue)
|
||||
/*
|
||||
document.querySelectorAll('.shx-custom-dropdown-content div').forEach(div => {
|
||||
if (div.getAttribute('data-value') === selectedValue) {
|
||||
div.classList.add('shx-custom-selected-variant');
|
||||
} else {
|
||||
div.classList.remove('shx-custom-selected-variant');
|
||||
}
|
||||
}); */ /*
|
||||
}); */
|
||||
</script>
|
||||
{% else %}
|
||||
{%- if picker_type == 'swatch' -%}
|
||||
|
|
Loading…
Reference in New Issue