Widget: fix prefill 1 with variation-product (#5229)

This commit is contained in:
Richard Schreiber
2025-06-10 20:34:47 +02:00
committed by GitHub
parent 24c02751cc
commit d53af424cf

View File

@@ -252,7 +252,7 @@ Vue.component('availbox', {
variation: Object
},
mounted: function() {
if (this.$root.itemnum === 1 && !this.$root.has_seating_plan ? 1 : 0) {
if (this.$root.itemnum === 1 && (!this.$root.categories[0].items[0].has_variations || this.$root.categories[0].items[0].variations.length < 2) && !this.$root.has_seating_plan ? 1 : 0) {
this.$refs.quantity.value = 1;
if (this.order_max === 1) {
this.$refs.quantity.checked = true;