Shopify themes, liquid, logos, and UX
Hi there,
Does anyone know a way to amend our code to default our custom widget to opening on subscribe and save instead of one time purchase?
Web page example - https://scrummi.com/products/original-waffle-towels
@scrummitowelsdollartree wrote:Hi there,
Does anyone know a way to amend our code to default our custom widget to opening on subscribe and save instead of one time purchase?
Web page example - https://scrummi.com/products/original-waffle-towels
You can adjust your code by setting the default option for your custom widget to "subscribe and save" instead of "one time purchase" in the widget's initialization parameters. Look for a property related to default selection and change it accordingly. If you need specific code examples, please share more details about the widget's implementation.
Hi @scrummitowels,
Please go to Actions > Edit code > Layout > theme.liquid file and paste the below code before </head>
{%- if request.page_type == 'product' -%}
<script>
const subscribeAndSave = document.querySelector('#subscribe-and-save');
if (subscribeAndSave) subscribeAndSave.click();
</script>
{%- endif -%}
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025