Hey Team!
I’m hoping someone can help me please. I’m a novice, so any help would be great!
I am trying to add the “Notify Me When Available” button on my product page as I am hoping to start a “back in stock” Klaviyo flow.
MY PROBLEM: I can’t get the correct button style in the correct location.
I have been following these instructions from Klaviyo - https://help.klaviyo.com/hc/en-us/articles/360001895651
My theme is Sense 12.0.0.
I’ve used the below code in the theme.liquid file as per the Klaviyo instructions.
<script src="https://a.klaviyo.com/media/js/onsite/onsite.js"></script>
<script>
var klaviyo = klaviyo || [];
klaviyo.init({
account: "PUBLIC_API_KEY",
platform: "shopify"
});
klaviyo.enable("backinstock",{
trigger: {
product_page_text: "Notify Me When Available",
product_page_class: "button",
product_page_text_align: "center",
product_page_margin: "0px",
replace_anchor: false
},
modal: {
headline: "{product_name}",
body_content: "Register to receive a notification when this item comes back in stock.",
email_field_label: "Email",
button_label: "Notify me when available",
subscription_success_label: "You're in! We'll let you know when it's back.",
footer_content: '',
additional_styles: "@import url('https://fonts.googleapis.com/css?family=Helvetica+Neue');",
drop_background_color: "#000",
background_color: "#fff",
text_color: "#222",
button_text_color: "#fff",
button_background_color: "#439fdb",
close_button_color: "#ccc",
error_background_color: "#fcd6d7",
error_text_color: "#C72E2F",
success_background_color: "#d3efcd",
success_text_color: "#1B9500"
}
});
</script>
And I got this result - https://itscooltocry.com/products/unisex-teamwork-hoodie?variant=45177745801431 Please also see screenshot below
RESULT: The button style is correct, but location isn’t. I’d like it below the “Sold out” button.
I then tried to paste the below code into a custom liquid block on the product page (please note I am testing this on a different product page to the above so I can easily compare) and I get this result - https://itscooltocry.com/products/womens-smiley-ish-long-sleeve-t-shirt?variant=44122406256855 Please also see screenshot
<a class="klaviyo-bis-trigger" href="#">Notify Me When Available</a>
RESULT: Button location is correct, but button style is incorrect.
MY QUESTION: Can someone please show/tell me how to customise the button so it is the same style as the existing “sold out” button and placed directly underneath the “sold out” button?
Thanks!
Jack








