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 -%}
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024