"Add to cart" button disappears sometimes

Hello,

I noticed that the add to cart button disappears and appears on the product detail page. If you load the page the button is visible for a second and then it’s gone.

If you reload the page a couple of times it appears and disappears. Anyone an idea? The page is shop.avoseedo.com

Thanks,

@Daniel25

Are you using some apps to show inventory availability? The code is loaded dynamically and it makes it appear late. But functionally no issue. if the code was inline instead of being loaded through javascript you won’t see any lag.

Hope it helps.

Hi,

@Propero

thanks for your reply. No I don’t use any apps to show inventory I just use the Shopify inventory management that comes with.

I also checked the product.liquid template I couldn’t find anything obvious. Here is the button code:


              {% unless product.available %}
              

Out of stock

              

Notify me when item is back in stock

              {% else %}
              

In stock

               
                
                
                
              

              
              
1

              
              {% endunless %}
            

        
          {% if product.available %}
        
          {% endif %}

@Daniel25

Ok, any app for product options? If the answer is no, I will have to login to your admin panel through collaborator access to check. Direct message me if needed.

I found the issue and fixed it. For anyone else who may have this, it was caused by an app I had installed and uninstalled some time ago.

The app was: Advanced PreOrder(Partial Pay) it added a class to the button sometimes which made it disappear. It left a javascript call in the header.


After deleting it everything was normal again.

Thanks!

2 Likes

Worked. This has been an issue for the last year. Thank you!

Worked for me as well. Thank you.

Hi there. This happened to me to. Where did you find this code in order to delete it?

@Ivi_Kyratzi ,

It may not be same code/script which is causing for you but something else. Can be looked at by logging in.

Go to Sales Channels → Online Store → Themes > customice → on the left on the bottom Theme actions → edit code and then theme.liquid should have the code snippet somewhere at the top between the

so if I delete this code from the theme it will solve the issue?

<script src="https://shinedezign.tk/preorder/js/preorder.js"></script>

I am apprehensive to delete this in case anything happens?

Thanks

If you don’t want to use this add-on anymore you can remove it without any issues. Also, you can add it again if you see something has changed.

1 Like

This solved my missing ATC button issue too. YAY! Thanks so much!