Solved

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

  • 31 January 2024
  • 7 replies
  • 115 views

Badge

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>

 

icon

Best answer by Brian Turcotte 8 February 2024, 19:38

View original

7 replies

Userlevel 7
Badge +36

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

Badge

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.

Userlevel 7
Badge +36

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

Badge +3

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  

Userlevel 1
Badge

@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

 

Badge

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

 

 

Userlevel 1
Badge

@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