• Resolved superninchen

    (@superninchen)


    Hi,

    on our shop page we have a strange phenomenon with the “add to cart” button frequently being replaced with the “read more” button for random products.

    Clearing the cache (with WP Fastest Cache) resolves the issue for a while, but after a few hours some products show “read more” again, instead of “add to cart”. Sometimes, if we’re lucky, the “add to cart” button is still available on the product details page, so the customers can make the purchase, but sometimes that button is then missing in the product details page. As said, clearing the cache fixes it.

    I do not see a pattern as to when it happens and to which products. Therefore I have no clue where to start looking. ??

    The HTML code to the respective buttons includes the identical CSS classes, only different links (a href=”?add-to-cart=60326″ vs. a href=”https://www.beemybear.com/produkt/plotterdatei-grill-chill/) and different aria-label texts.

    The theme is a child theme of Impreza, version 8.8.2 with quite a few modifications in the functions.php file, but if it were a coding error the problem wouldn’t be fixed by clearing the cache, only to reoccur a few hours later again, would it?

    Has anyone had the same problem before and found the root cause?

    Thanks in advance for any pointers
    Sascha

    P.S.:
    This is the list of active plugins:

    Advanced Database Cleaner PRO, Version 3.2.1
    Alfahosting Sender Mail Plugin, Version 1.0
    Angell EYE Updater, Version 2.0.17
    Antispam Bee, Version 2.11.1 
    Autoptimize, Version 3.0.4
    Better Search Replace, Version 1.4 
    Broken Link Checker, Version 1.11.16 
    Classic Editor, Version 1.6.2	
    Country Based Restrictions for WooCommerce, Version 3.2 
    Automatische Aktualisierungen aktivieren
    Delete Me, Version 3.0 	
    Enable Media Replace, Version 3.6.3
    EU Cookie Law, Version 3.1.6 
    GDPR Cookie Consent, Version 2.1.2 
    German Market, Version 3.15 	
    Gift Cards Pro, Version 3.3.10
    Health Check & Troubleshooting, Version 1.4.5 
    Loco Translate, Version 2.6.2, Version 3.8.5 
    Redirection, Version 5.2.3
    Regenerate Thumbnails, Version 3.1.5
    Remove Unused Media, Version 1.1.8 
    Smush, Version 3.10.2 
    Ultimate Addons for WPBakery Page Builder, Version 3.18.0
    UpdraftPlus – Backup/Restore, Version 2.15.2.1
    UpSolution Core, Version 8.8.2 
    WooCommerce, Version 6.6.1	
    WooCommerce Coupon Links, Version 2.2.0 
    WooCommerce Product Dependencies, Version 1.2.7 
    Wordfence Security, Version 7.5.11
    WP Fastest Cache, Version 1.0.2
    WP Mail SMTP, Version 3.4.0
    WP Rollback, Version 1.7.1
    WP STAGING PRO, Version 3.1.8
    WPBakery Page Builder, Version 6.9.0
    YITH WooCommerce Order & Shipment Tracking, Version 2.4.0
    YITH WooCommerce Wishlist, Version 3.10.0 
    Yoast Duplicate Post, Version 4.5 
    Yoast SEO, Version 19.2

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Roxy

    (@roxannestoltz)

    Hi @superninchen ,

    Thanks for reaching out!

    I understand that you are experiencing products displaying with Read More, rather than Add to cart.

    This is expected behavior when a product is “out of stock”. Once the product is set to “in stock”, the add to cart button will display, replacing the Read More button.

    Please check that the products with the Read More button are set to in stock, if this is the case and stock is available.

    Hope this helps!

    Plugin Support nathvi V. a11n

    (@nathvi)

    Hi @superninchen

    The button on the shop page is dynamic – for example, if you’re working with a variable product where the customer needs to make a choice, that button will show “Choose options” instead of “Add to cart”.

    “Read more” is also displayed when the product can’t be added to the cart – that’s usually due to the product not being in stock as @roxannestoltz mentioned above.

    Can you check that all products have stock assigned?

    Thread Starter superninchen

    (@superninchen)

    @nathvi @roxannestoltz Thank you for your reply.

    The products aren’t variable. They are simple products, downloadables, so they aren’t out of stock either.

    As said, deleting the cache fixes it for a while. This wouldn’t be the case if the products were out of stock or variable.

    As an intermediate fix I have disabled the caching plugin and will observe if this is th culprit. But still it makes me wonder how the buttons can get mixed up in the cache.

    Cheers,
    Sascha

    Roxy

    (@roxannestoltz)

    Hi @superninchen ,

    Thanks for providing clarity!

    The products aren’t variable. They are simple products, downloadables, so they aren’t out of stock either.

    Kindly note that stock level would still need to be added as “in stock” for downloadable/virtual products in order for them to be eligible for adding to the cart. If they are set to “Out of stock” the “Read more” button will still replace the “Add to cart” button even if the product is downloadable/virtual.

    Since you have confirmed that the items are set as “in stock”, and that disabling a caching plugin seems to resolve the issue, this would point to that specific plugin possibly causing a conflict.

    Please let me know if the issue persists even with the caching plugin disabled, and further troubleshooting can be done.

    Thanks ??

    Hi @superninchen

    Just to add – here’s a helpful guide for configuring caching plugins: https://docs.woocommerce.com/document/configuring-caching-plugins/ . You’ll want to make sure that the caching plugins are configured not to cache the cart, checkout, and My Account pages. In this particular case, it seems that disabling the plugin(s) may be the solution, as you stated.

    As for stock management of downloadable products you can check the documentation if need be: https://woocommerce.com/document/digital-downloadable-product-handling/#downloadable-simple-products

    Thread Starter superninchen

    (@superninchen)

    @all Thanks for the help so far.

    The caching plugin was configured to exclude the account, cart, and checkout page. Anyway, the problem does not occur with any of those pages.

    Also, the stock status is not the reason for the mix-up, as clearing the cache wouldn’t have an effect on it. All affected products are “infinitely” available and cannot run out of stock.

    Disabling the caching plugin is not the solution either, just a temporary workaround until the problem can be solved. The goal is to have a proper caching for the sake of optimizing page speed. Therefore, leaving it disabled is not an option.

    Hoping to hear from someone who has had the same problem and found a fix.

    Cheers
    Sascha

    Mirko P.

    (@rainfallnixfig)

    Hi @superninchen,

    Thanks for getting back with additional information.

    Reading the thread here I see that you reported the issue vanishes when you clear the cache. It’s a good starting point that puts you on the right track to troubleshoot the problem, but I’m not sure how related it can be to WooCommerce itself.

    I did not come across this specific issue in the last couple of years on my test installations which are on a basic configuration of the latest versions of WordPress, WooCommerce and the Storefront theme.

    These are some steps I can think of for further troubleshooting:

    Don’t hesitate to write back if you feel we can be of any further assistance.

    Cheers.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Weird behaviour with “add to cart” button’ is closed to new replies.