Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1130480

    roddirks
    Participant

    Hello. I recently switched to X theme from storefront. Woocommerce worked without issue with storefront, but now that I have X theme, I cannot add an item to my cart unless I am logged in as a registered user. For sure in Chrome browser this is an issue. I have enable/disabled AJAX add to cart, all plugins have been disabled, Woocommerce and all data deleted, recreated. It will not work. Any ideas?

    http://essencecoffeeroasters.com

    #1130483

    roddirks
    Participant

    Update, I have created a product called “Test”. This is a simple, uncategorized product. It doesn’t work either.

    #1130558

    Christian
    Moderator

    Hey there,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1131415

    roddirks
    Participant
    This reply has been marked as private.
    #1131432

    Lely
    Moderator

    Hi There,

    Thank you for the credentials. This might be a caching issue:
    https://wordpress.org/support/topic/add_to_cart-function-not-adding-to-cart-when-logged-out
    Since you don’t have a caching plugin, please check in with your hosting provider. They might have a caching. Do let us know how this goes.

    #1131863

    roddirks
    Participant

    I have checked into the caching issue, and submitted a ticket to my host. I will copy their response below. It is interesting tho, how it worked flawlessly until I switched to X. Is there a conflict somewhere?

    Hello Rod,

    Thank you for contacting our Help Desk.

    I was able to replicate your issue on our end. I can confirm that this is issue is not cache-related as I flushed the static cache + WordPress cache but that had no effect. It seems that the shopping cart has not been configured properly. I would advise you either to contact Woocommerce’ developers/community for assistance with doing so or a professional WordPress developer. Unfortunately, this falls out of our scope of support and we will not be able to help you much further.

    Your understanding would be greatly appreciated.

    Kind regards,

    Dimitar Taulov
    Technical Support Team

    #1131930

    Darshana
    Moderator

    Hi there,

    First of all, you could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

    Let us know how it goes.

    #1132259

    roddirks
    Participant

    As the original post mentioned, all plugins have been disabled, and tested, it did not fix it. Plugins were then re enabled.

    #1132426

    Nabeel A
    Moderator

    Hi again,

    It looks like you’ve done some Customization in your X theme due to that <head> links and scripts are being called in <body> tag which is breaking the functionality of the theme. Please re-install the X theme and for any sort of customization I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Cheers!

    #1132560

    roddirks
    Participant

    Deactivated X, uninstalled, and reinstalled. Same as before, products will not add to cart.

    #1133012

    Lely
    Moderator

    Hello There,

    If this is not a caching issue, please check this thread:https://wordpress.org/support/topic/add-to-cart-not-working-for-users-who-are-not-logged-in. Try the suggestion regarding Session directory.

    Hope this helps.

    #1134249

    roddirks
    Participant

    First off, thanks for your help. The issue was found by my host’s tech team. I am certain i never modified this file, so i do not know where this line of code came from. Copied below is the response from them.

    Hello,

    Thank you for your patience!

    We have reviewed your case in details. I would like to first clarify that we do not cache the checkout and cart pages of your WordPress based website. They are excluded by default. We also do not cache sessions.

    Due to this reason our caching functionality is not the reason for your issues.

    We do have thousands of WordPress and Woocommerce based websites working on all of our servers and they are working flawlessly.

    Our servers also do set cookies right, since if they were not working properly you would not be able to login into your website.

    I have checked your website’s configuration. Upon my investigation I have found that you have an incorrectly added code at the beginning of your website’s index.php file:

    Code:
    essenc24@essencecoffeeroasters.com [~/public_html]# head -n1 index.php
    <body style=””><?php

    This code is not supposed to be there. I have deleted it and now the add to cart button works properly without any issues. You may check the results on your end.

    If you have further questions, you are more than welcome to contact us by opening a ticket.

    Best Regards,
    Kiril I.
    Technical Support Supervisor

    #1134765

    Paul R
    Moderator

    Hi,

    Glad to know that the issue was resolved.

    I am sorry but we also have no idea how the code get added in your index.php file.

    Those might have been added in support to your previous theme.

    Thanks

    #1215011

    82West
    Participant

    Hello. I am having the same problem. “Add to cart” has been working fine for months, but now it’s not working. After clicking the ‘add to cart’ button I’m taken to an empty cart page.

    I have woocommerce set up to re-direct to the cart after hitting the ‘add to cart’ button but the site isn’t actually adding the product to the cart.

    EssentialPuree.com
    WP 4.6.1
    X 4.6.4
    Cornerstone 1.3.3
    Child Theme 1.0.0
    Woocommerce 2.6.4

    #1215012

    82West
    Participant
    This reply has been marked as private.