"Add to cart" button disappears sometimes.

Solved
Highlighted
Shopify Partner
9 1 1

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,

0 Likes
Highlighted
Shopify Partner
582 69 93

@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.

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution

Skype : lokendra.panwar1
0 Likes
Highlighted
Shopify Partner
9 1 1

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:

 

 

            <div class="purchase-section{% if product.variants.size > 1 %} multiple{% endif %}">
              {% unless product.available %}
              <p>Out of stock</p>
              <p>Notify me when item is back in stock</p>
              {% else %}
              <p>In stock</p>
               <div class="product-single__quantity{% unless settings.product_quantity_enable %} is-hidden{% endunless %}">
                <input id="minus" class="qtyminus" type="button" value="-">
                <input type="number" id="Quantity" name="quantity" value="1" min="1" class="quantity-selector">
                <input id="plus" class="qtyplus" type="button" value="+">
              </div>
              <input type="submit" class="btn addtocart" name="add" value="Add to cart" id="add-to-cart" />
              <div id="cart-animation" style="display:none">1</div>
              <input type="hidden" name="return_to" value="/checkout" />
              {% endunless %}
            </div>
        <!-- End product options -->
          {% if product.available %}
        </form>
          {% endif %}

 

0 Likes
Highlighted
Shopify Partner
582 69 93

@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.

 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution

Skype : lokendra.panwar1
0 Likes
Highlighted
Shopify Partner
9 1 1

This is an accepted solution.

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.

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

 

After deleting it everything was normal again.

Thanks!

1 Like
Highlighted
New Member
1 0 0

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

0 Likes
Highlighted
New Member
1 0 0

Worked for me as well. Thank you.

0 Likes
Highlighted
New Member
1 0 0

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

0 Likes
Highlighted
Shopify Partner
582 69 93

@Ivi_Kyratzi ,

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

 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution

Skype : lokendra.panwar1
0 Likes
Highlighted
Shopify Partner
9 1 1

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 <head> 

0 Likes