Personalized checkout and custom promotions with Shopify Scripts
<html>
<head>
<script type = "text/JavaScript">
<!--
function AutoRefresh( t ) {
setTimeout("location.reload(true);", t);
}
//-->
</script>
</head>
<body onload = "Javascript:AutoRefresh(5000);">
<p>This page will refresh every 5 seconds.</p>
</body>
</html>
What's the purpose of doing an auto-reload of the page when another variant is selected?
Also, this forum is for questions related to Shopify Scripts (part of Shopify Plus). You might get better responses if you post it in Shopify Design.
my purpose for that, because Compare at price ( old price ) does not change when changing variant, it's change until i refresh the page
A theme should implement in-place updates of price, images, etc. when the variant changes, see the docs here: https://shopify.dev/themes/product-merchandising/variants#variant-selection
not solved my problem yet 😞
What theme are you using?
Yeah, thought as much. ThemeForest themes are often crap. If it's not implementing the methods to update product info on variant change there's probably more that's iffy about the theme. I would seriously recommend ditching it and going with one from the Theme Store or, if you're strapped for cash, go with Dawn or one of the legacy free themes like Debut, Brooklyn, etc.
thanks for your advice !
<html>
<head>
<script type = "text/JavaScript">
<!--
function AutoRefresh( t ) {
setTimeout("location.reload(true);", t);
}
//-->
</script>
</head>
<body onload = "Javascript:AutoRefresh(5000);">
<p>This page will refresh every 5 seconds.</p>
</body>
</html>
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025