Solved

Back in Stock Flow Button Not Working in Brooklyn Theme

  • 21 October 2021
  • 3 replies
  • 128 views

Badge +2

Hello,

I want to add the Back In Stock flow button so it shows “email me when back in stock” on the product page. I followed the instructions and read all the similar problem people had in the community page. This post describes the similar problem that I had. I tried the solution in there and stuck at 1 step.

 

I would also check the Add to Cart button. The Add to Cart form needs to be present on the product page in order for the Klaviyo Out of Stock code to work. Some themes may remove these by default when there is no stock. To check if this is there, you can use the following snippet inside of the javascript console:

I would also check the Add to Cart button. The Add to Cart form needs to be present on the product page in order for the Klaviyo Out of Stock code to work. Some themes may remove these by default when there is no stock. To check if this is there, you can use the following snippet inside of the javascript console:

document.querySelector('form[action="/cart/add"]')

If it returns null, that means there is no form. And you would need to add a form element like:

<form action="/cart/add"...></form>

 

Could anyone please show me how to do this step? Thank you.

icon

Best answer by stephen.trumble 22 October 2021, 11:16

View original

3 replies

Badge +2

Thank you for your reply, Stephen. It didn't work yesterday but today I did it. Either the code might be need time to activate or I have to activate the BIS flow first before adding the code. Yesterday I added the code first then activate the BIS flow.

I’m really glad it finally worked out. Very helpful flow!

_ Musa Do

Userlevel 7
Badge +60

Hey @Musa Do 

Thank you so much for reaching out to the Klaviyo Community!

Just to clarify, you have already installed the correct code snippet in the theme.liquid file for the Brooklyn Theme on Shopify? Can you share a screenshot of the code in your file? Want to make sure it is correct before we add anything more as this step may not be necessary. However if you navigate to a product page on your website > right click > select inspect (this will bring up the javascript console for you to search the form for the code you shared above.)

I’ll be on the lookout for your response! 

Userlevel 7
Badge +60

Hey @Musa Do 

Happy to hear that it worked for you in the end! Like you said it really is a great flow to help build your business and keep your customers coming back for more! 

Reply