• Resolved edgarcastrojr

    (@edgarcastrojr)


    Hi support team,

    When I try to add an item using “Add to Cart” button, it just refresh the page but does not add it. Could you please support me on this?

    Thank you!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @edgarcastrojr,

    When I try to add an item using “Add to Cart” button, it just refresh the page but does not add it. Could you please support me on this?

    From what I understand, you’re experiencing an issue with the “Add to Cart” button on your WooCommerce site. It seems that when you click on the button, the page refreshes but the item is not added to the cart. I’m sorry for the inconvenience this is causing you and I’m here to help.

    Here’s what you can do to potentially resolve the issue:

    1. Update all your plugins and themes: Ensure all your plugins and themes are up-to-date. An old plugin or theme might be conflicting with WooCommerce.
    2. Check for a plugin conflict: Another plugin on your site might be causing a conflict. You can deactivate all other plugins except WooCommerce temporarily and see if the problem persists. If it doesn’t, reactivate your plugins one by one to identify the culprit.
    3. Look for a theme conflict: If the problem isn’t with the plugins, it might be your theme. Switch to a default WordPress theme like Storefront and see if the “Add to Cart” button works. Here’s a guide on how to test for conflicts: ?? How to Test for Plugin and Theme Conflicts.
    4. Diagnose JavaScript Errors: JavaScript errors can disrupt functionality. Use your browser’s console to find these errors. ?? Here’s a useful guide on Using Your Browser to Diagnose JavaScript Errors.
    5. Turn on Debugging: If the issue continues, activate debugging in WordPress. This can help pinpoint the problem. Add these lines to your wp-config.php file:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    This will create a debug.log file in your wp-content directory, logging any PHP errors or notices. For a more detailed guide on enabling debugging in WordPress, you can visit this link: ?? Debugging in WordPress

    If the issue continues after trying these steps, please share more details, like the exact error messages you see when debug mode is on. This will help us identify and solve the problem more effectively.

    Also, we’d find it helpful if you could share your site’s System Status report. This will give us a better understanding of your site’s setup and help us pinpoint the problem. You can find it via WooCommerce > Status. Select Get system report and then Copy for support.

    Lastly, could you share the fatal error logs (if any) under WooCommerce > Status > Logs.

    Once you’ve gathered this information, please paste it inside a Code block in your reply, or use https://pastebin.com to paste it and share the link with us.

    Thanks for your patience and cooperation in this matter! We’re here to help you get this sorted.

    Thread Starter edgarcastrojr

    (@edgarcastrojr)

    Hi thank you for your assistance, the issue still happening, please see the information requested below:

    https://pastebin.com/ExPVfN25

    Thank you for your support!

    Hi @edgarcastrojr,

    the issue still happening, please see the information requested below

    Thanks for sharing the detailed information! I’ve taken a look at the system status report and error logs you sent over.

    The error logs indicate a critical issue with the Sydney theme. Specifically, the error message says: “Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method Sydney_Header::logo() cannot be called statically”. This glitch might be the culprit behind the “Add to Cart” button malfunction.

    Here’s what I recommend:

    1. Get your theme up-to-date: Ensure your Sydney theme is current. If not, let’s bring it up to speed by updating it to the latest version.
    2. Give a default theme a whirl: To check if the Sydney theme is the problem, why not try out a default WordPress theme like Storefront temporarily? If the “Add to Cart” button works fine then, it’s clear the Sydney theme is the issue.
    3. Reach out to the theme author: Since your theme seems to be the troublemaker, it would be a good idea to contact the theme author for support. They know the theme’s code inside out and can help you solve this issue effectively.
    4. Tweak your PHP settings: Right now, your PHP Time Limit is set at 60, which might be a bit too restrictive, causing the process to time out. Let’s try ramping this up to 1200 and see if that does the trick. You can adjust this in your php.ini file or ask your hosting provider for help.
    5. Boost Memory Limit: Your current WP Memory Limit is 512 MB. Increasing this limit might solve the problem. You can do this by modifying your wp-config.php file and adding this line of code at the bottom:  define('WP_MEMORY_LIMIT', '1024'); Here’s a helpful guide on how to do that: ?? Increasing the WordPress Memory Limit Here.
    6. Re-check for JavaScript errors: After taking the above steps, let’s go back and look for JavaScript errors again. Any new errors could give us more insights into the problem.

    Give these steps a shot and keep us posted on how things go. If the issue persists, we’ll dig deeper. We appreciate your patience and cooperation!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Add to Cart” button not working’ is closed to new replies.