Skip to main content
Solved

Where to insert the Notify me snippet in the product.liquid file


Forum|alt.badge.img+1

Hi, so I successfully added the notify me button for back order items on our website and it works fine.

But it doesn’t work when people change the website language though, so I have to insert a snippet in the product.liquid file (so it shows on every product page no matter the language selected - .com or .com/en). I have no idea where to put it though so it appears under the variant selector.

Here is a preview of our product.liquid code. Where should I paste it? 

The code provided by Klaviyo to be pasted is: <a class="klaviyo-bis-trigger" href="#">Notify Me When Available</a>

 

Best answer by Brian Turcotte

Hi @SoloInline!

What Shopify theme are you using? The back-in-stock functionality is only intended to work on the free Shopify themes. Paid or custom themes affect the styling of the back-in-stock module in ways that can’t be accounted for from Klaviyo’s end.

 

Best,

Brian

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

7 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @SoloInline!

The Back in Stock functionality is only supported for one-language sites, so this topic is technically beyond of the scope of Community/Support. That said, if you have the ability to do so, I would simply recommend testing this by placing the snippet in various places for an item that’s out of stock, and then using a different browser to check that it populated in the correct spot.

 

If you require further development help, you’re always welcome to reach out to one of our wonderful Official Partners who may be able to assist with this.


Best,

Brian


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • February 1, 2024

Hi, so I think it can be in the community/support scope because I’m referring to that procedure Customizing the location of the "Notify Me" button: https://help.klaviyo.com/hc/en-us/articles/360001895651

I managed to insert the snippet in the product.liquid file as mentionned in the procedure, but now it just shows as text, the colors and box I set up in theme.liquid doesn’t show.


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

Hi @SoloInline!

What Shopify theme are you using? The back-in-stock functionality is only intended to work on the free Shopify themes. Paid or custom themes affect the styling of the back-in-stock module in ways that can’t be accounted for from Klaviyo’s end.

 

Best,

Brian


Forum|alt.badge.img+3
  • Contributor I
  • 1 reply
  • February 16, 2024

Hi @SoloInline

Where exactly in the main-product.liquid file did you place the snippet? I am experiencing the same problems as you, so really curious if you were able to find a fix! 

 

Thanks! 

 

Best,

Nick  


Forum|alt.badge.img+1
  • Contributor II
  • 4 replies
  • February 20, 2024

@Brian Turcotte It’s time to update the Klaviyo docs!  The “free Shopify themes” you have listed for official support were all retired and removed by Shopify in 2022.  Now with Online Store 2.0 themes it’s far easier to add the Back in Stock notifications as Custom Liquid blocks (no longer need to edit the theme code).

 

@Nickdonsje @SoloInline here’s a solution that will work for all of Shopify’s newer OS 2.0 free themes as well as most premium or custom themes.

https://community.klaviyo.com/integrations%2Dand%2Dreviews%2D39/shopify%2Donline%2Dstore%2D2%2D0%2Ddawn%2Dback%2Din%2Dstock%2Ddocumentation%2D10869?fid=39

 


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • February 21, 2024

@jonathanmoore Omg it worked and it took literally 2 minutes, thank you so much!!

 

 


Forum|alt.badge.img+1
  • Contributor II
  • 4 replies
  • February 22, 2024

@SoloInline I really hope Klaviyo updates their docs. This approach is much easier than the current documentation.  As a bonus, with custom liquid blocks you don’t have to edit the theme’s code turning off the auto-updates.


Reply