Adapting Klaviyo Back-in-Stock code to Stiletto theme

Topic summary

A user migrated from Shopify’s Dawn theme to Stiletto and encountered issues with their Klaviyo back-in-stock notification code. The code previously worked when added to a custom liquid block on product pages in Dawn but fails in Stiletto.

Key Details:

  • The provided code snippet includes Klaviyo initialization with account/list IDs and product exclusion tags
  • Part of the code appears corrupted or reversed (text displayed backwards)
  • Neither Klaviyo nor Stiletto offers support: Klaviyo only assists with select free Shopify themes, and Stiletto doesn’t provide coding help

User’s Request:
Seeking guidance on what modifications are needed to make the back-in-stock code compatible with Stiletto’s structure, particularly suspecting labeling/formatting issues.

Status: Unresolved - no responses yet with solutions or troubleshooting steps.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

We recently switched to the Stiletto theme from Dawn and I tried reinstalling the coding the same way I had it in Dawn and it’s not working. I was able to add this code into a custom liquid block directly on the product page in Dawn. I think something with the labeling is off, but I have had no luck when trying to make adjustments based on what I can find about Stiletto. Has anyone done this before/ know what I need to change to make it work? Klaviyo says it only will help with select free Shopify themes and Stiletto doesn’t provide coding assistance.

Here is the code:

<script src="https://a.klaviyo.com/media/js/onsite/onsite.js"></script>
<script>
    var klaviyo = klaviyo || [];
    klaviyo.init({
      account: "W9w6Wt",
      list: "SeJyAh",
      platform: "shopify”,
      exclude_on_tags: “sale25, sale35, sale50, sale65, sale75, saletable25, saletable35, saletable50, saletable65, saletable75”
    });
    klaviyo.enable("backinstock",{ 
    trigger: {
      product_page_text: "Notify Me When Available",
      product_page_class: “btn”,
      product_page_text_align: "center",
      product_page_margin: "0px",
      replace_anchor: true
    },
    modal: {
     headline: "{product_name}",
     body_content: "Register to receive a notification if and when this item comes back in stock.",
     email_field_label: "Email",
     newsletter_subscribe_label: "Add me to your email list."
     subscribe_checked: true
     button_label: "Notify Me When Available",
     subscription_success_label: "You're in! We'll let you know if and when it's back.",
     footer_content: '',
     additional_styles: "@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');",
     drop_background_color: "#000",
     background_color: "#fff",
     text_color: "#374762",
     button_text_color: "#fff",
     button_background_color: "#94A9CB",
     close_button_color: "#ccc",
     error_background_color: "#fcd6d7",
     error_text_color: "#C72E2F",
     success_background_color: "#d3efcd",
     success_text_color: "#374762"
    }
  });
</script>
2 Likes