Skip to main content
Solved

Back in Stock is not showing in different country view

  • February 15, 2023
  • 3 replies
  • 123 views

Forum|alt.badge.img+2

Hi there,

 

I set up basic Back in Stock flow and add script tags to our website which has USA by default.

I only modified styles from the script code.

The notify button is automatically added to US store, but when I change to Canada, the button is not showing. 

I don’t see any other console error message though. What would possibly cause this?

Best answer by Brian Turcotte

HI @gracesplitmango,

 

Would you mind explaining a little more about how your multi-region store is set up? For example, do you have two different store fronts/domains? How does the region switching mechanism work for your store? 

 

I’m asking because it’s possible that you only have the the script tags added in the files of one of the store. Also, since it’s a back in stock button, is it possible that you have two different products for each the U.S. and Canada stores, and only one of them is out of stock?

 

Thanks,

Brian

View original
Did this topic or the replies in the thread help you find an answer to your question?

3 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @gracesplitmango and welcome to The Community!

 

Just to clarify, do you have two different stores within one Klaviyo integration? Also, are you using a native Klaviyo integration (Shopify, Magento, etc.), or is this a custom integration?

 

Would you be willing to share the script (with any sensitive info redacted)? It will likely be easier for myself and other Community members to determine the cause of the issue if we can examine the code.

 

Looking forward to hearing back, and thanks for using the Community!

 

- Brian


Forum|alt.badge.img+2

Hi Brian,

 

Thanks for your reply!

I am using native Klaviyo integration on our shop, using Be Yours Beauty theme.

The Back in Stock button doesn’t work only in Canada region when I test. It works totally fine in USA or other countries. :/ 

 

Here is my script tag:

 

```

<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",

product_page_class: "klaviyo-btn button button--medium button--full-width",

product_page_text_align: "center",

product_page_margin: "30px 0",

collection_page_class: 'klaviyo-btn',

collection_page_text: 'Notify Me',

replace_anchor: false

},

modal: {

newsletter_subscribe_label: "Add me to your newsletter.",

headline: "{product_name}",

body_content: "Enter your email to be notified when this item is 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.",

additional_styles: "@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700;800&display=swap');",

footer_content: '',

font_family: '"Montserrat"',

headers_font_family: '"Montserrat"',

drop_background_color: "#482C17",

background_color: "#FFF",

text_color: "#54565A",

button_text_color: "#fff",

button_background_color: "#A3D7DC",

close_button_color: "#54565A",

error_background_color: "##D62E00",

error_text_color: "#fff",

success_background_color: "#A3D7DC",

success_text_color: "#fff"

}

});

</script>

```

 


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • February 23, 2023

HI @gracesplitmango,

 

Would you mind explaining a little more about how your multi-region store is set up? For example, do you have two different store fronts/domains? How does the region switching mechanism work for your store? 

 

I’m asking because it’s possible that you only have the the script tags added in the files of one of the store. Also, since it’s a back in stock button, is it possible that you have two different products for each the U.S. and Canada stores, and only one of them is out of stock?

 

Thanks,

Brian