Solved

'Add to Cart' greyed out when using Back in Stock Flow

  • 5 November 2022
  • 4 replies
  • 188 views

Badge +1

I’ve installed the Klavio back in stock flow on the Dawn theme.

It works however there is one problem.

When changing my selection from an in-stock variant to an out of stock variant, then back to the in-stock variant - the add to cart button becomes greyed out.

This is fixed via a page refresh, but not exactly ideal.

Neither true nor false in my replace_anchor setting fixes the issue. I’ve also tried adding the code snippet into the main-product.liquid file to modify the location of the button, but this does nothing.

Here is a link to the preview showing the issue: https://vb0no5ohoot7c030-62422057151.shopifypreview.com

Any advice on how to fix this is much appreciated!

icon

Best answer by Taylor Tarpley 8 November 2022, 23:06

View original

4 replies

Userlevel 7
Badge +60

Hi there @CampbellD

 

Welcome to the Community! Happy to help and great job troubleshooting thus far!

 

From what you mentioned, it seems that there is a lag with the web page interpreting that you’re back on a variant that’s in stock. Do you mind sharing whether the ‘notify me when available’ button ever replaces the add to cart button or it only grays out when the variant is out of stock and the ‘notify’ button doesn’t appear?  

 

While we are only able to help implement and troubleshoot back-in-stock for standard free Shopify themes, I might be able to help point you in the right direction, while a developer or Klaviyo partner would need to be the one troubleshooting and installing a custom solution for you. 

 

Thanks!

-Taylor

Userlevel 7
Badge +60

Hi there @CampbellD

 

I did some more digging and believe this issue is due to your website not fully updating by itself as it isn’t refreshing to the URL/Product of the updated variant. It seems that your site’s JS application is not recognizing the variant changes. I would have a developer or partner look to fixing your JS in order to identify changes in variant selection and check out this thread on a similar issue to gain more insight.

 

-Taylor 

Badge +1

Hi @Taylor Tarpley, thanks for the response. This is for the free Dawn theme, so I'm surprised it doesn't work out of the box considering this is the most popular free theme. I'll do some further testing and get answers to your previous questions.

Userlevel 7
Badge +60

Hi @CampbellD

 

I’m more confirdent that this issue moreso pertains to the last comment I mentioned about the website not refreshing the URL/product of hte updated variant. I would pursue that route first! 

 

Additionally, we only support these themes listed here!  

-Taylor 

Reply