From bbdd91e32165197f4fd68b1ba18eedf89dbe31bb Mon Sep 17 00:00:00 2001 From: alexanderroese Date: Sun, 14 Jul 2024 18:04:37 +0200 Subject: [PATCH] fix productvariant not correctly loaded after page reload --- snippets/product-variant-picker.liquid | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snippets/product-variant-picker.liquid b/snippets/product-variant-picker.liquid index 60550c5..9d970b7 100644 --- a/snippets/product-variant-picker.liquid +++ b/snippets/product-variant-picker.liquid @@ -197,6 +197,12 @@ } } }); + + window.addEventListener('load', function() { + const selectedValue = selectElement.value; + + console.log("sel", selectedValue) + }); {% else %} {% comment %}