Skip to main content
All CollectionsHelp Articles for New UITroubleshooting
Changing Offer Image to the Variant Image (New UI)
Changing Offer Image to the Variant Image (New UI)
Cristal avatar
Written by Cristal
Updated over a week ago

Sometimes you want to offer only a variant of your products to customers, however, due to Shopify's structure, this will not be displayed by default without some custom coding.

Luckily, we have a quick solution to even further customize your offers!

First, you will need to ensure only the offered variant is checked in the Offer Product section:

Then in the Text section (in the Content tab), copy and paste any of the two snippets of code below in the Offer Text field:

Code 1

<script>$(".nudge-offer .variants-wrapper select option").first().attr("selected","selected"); $(".nudge-offer .variants-wrapper select").trigger("change");</script>

OR Code 2

<script>
document.querySelector(".nudge-offer .variants-wrapper select option:first-child").setAttribute("selected","selected");
document.querySelector(".nudge-offer .variants-wrapper select").dispatchEvent(new Event('change'))
</script>

Finally, Save Draft or Publish, and you're all done! The selected variant's image will always be the default for that offer. If you have any questions or concerns, then we're always ready to help!

Did this answer your question?