• Resolved guytz72

    (@guytz72)


    I have an issue with existing users trying to purchase additional products through my WooCommerce store.

    If the exiting user goes to add an item to the cart AND logs in via the WooCommerce cart existing user login link, then the items never get added to the cart and there are just two spinning circles.

    If it is a new user and they sign up with the WooCommerce sign up process it works fine.

    If it is an existing user and they log in with the native WordPress login page before they try to purchase additional products, then the items get added to the cart fine as well.

    Seems like there is some issue with the WooCommerce login/cookies similar to what is discussed here: https://www.ads-software.com/support/topic/wc-ajaxupdate_order_review-403-error/

    However, I am in WP Multisite installation so apparently the fix discussed above is not appropriate.

    Any ideas what I can do to fix this error in a Multisite environment?

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • mother.of.code

    (@imazed)

    The Mother of Code

    Hi there!

    The first thing I would ask you to rule out is a plugin conflict. This kind of problem can be caused by a conflict with your theme or with another plugin.
    ?
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    This is best done on a staging site. That’s a copy of your live site, so you can test things out without making changes to your actual site. Some hosting companies offer a staging site service within their hosting plans. If yours does not, there is a great free plugin that will allow you to build a complete staging site with a few button clicks: https://www.ads-software.com/plugins/wp-staging.

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    Thread Starter guytz72

    (@guytz72)

    Hi, I did as you suggested, disabled all the plugins except WooCommerce, and used the storefront theme.

    Exact same issue happens, see below video of the spinning circles after using the WooCommerce cart login for an existing user:

    https://www.dropbox.com/s/jshymy4f5xazho0/IMG_3042.MOV?dl=0

    Thanks,
    Andrew

    Thread Starter guytz72

    (@guytz72)

    I’ve been working on this a bit more and the issue with access to the rest api is a plugin I have installed that I forgot about (sorry!). It restricts unauthenticated access to the api.

    I can specify which endpoints can have unrestricted access, can you please provide a list of all those specific endpoints I need to exclude. At the moment I have whitelisted everything under:

    /judgeme/v1

    And individually:
    /wc/v1/products
    /wc/v1/products/(?P<id>[\d]+)
    /wc/v1/products/batch

    /wc/v2/products/attributes/(?P<attribute_id>[\d]+)/terms
    /wc/v1/products
    /wc/v2/products/attributes/(?P<attribute_id>[\d]+)/terms/(?P<id>[\d]+)
    /wc/v2/products/attributes/(?P<attribute_id>[\d]+)/terms/batch
    /wc/v2/products/attributes
    /wc/v2/products/attributes/(?P<id>[\d]+)
    /wc/v2/products/attributes/batch
    /wc/v2/products/categories
    /wc/v2/products/categories/(?P<id>[\d]+)
    /wc/v2/products/categories/batch
    /wc/v2/products/(?P<product_id>[\d]+)/reviews
    /wc/v2/products/(?P<product_id>[\d]+)/reviews/(?P<id>[\d]+)
    /wc/v2/products/(?P<product_id>[\d]+)/reviews/batch

    /wc/v3/products/attributes/(?P<attribute_id>[\d]+)/terms
    /wc/v3/products/attributes/(?P<attribute_id>[\d]+)/terms/(?P<id>[\d]+)
    /wc/v3/products/attributes/(?P<attribute_id>[\d]+)/terms/batch
    /wc/v3/products/attributes
    /wc/v3/products/attributes/(?P<id>[\d]+)
    /wc/v3/products/attributes/batch
    /wc/v3/products/categories
    /wc/v3/products/categories/(?P<id>[\d]+)
    /wc/v3/products/categories/batch
    /wc/v3/products/reviews
    /wc/v3/products/reviews/(?P<id>[\d]+)
    /wc/v3/products/reviews/batch
    Can you let me know if I am missing any. This seems to have resolved the access to the shop issue as I can see my products in the Judge.Me website.

    The reviews are still not showing, and I am loosing sales because of it as I can see in the Google search console people searching for reviews. I do have one review showing in the carousel, but a new review that was added is not showing. Also, both reviews were from customers, and with the same email so they should have the verified badge but do not.

    Also, is there an option to add a JWT token to your plugin so it has authenticated access to the rest apis?

    I also have a blank Advanced and FAQ page in my Judge,Me screen, so if the option to set the above is in there, I can’t see it.

    Thanks for your help.

    • This reply was modified 3 years, 7 months ago by guytz72.
    • This reply was modified 3 years, 7 months ago by guytz72.
    • This reply was modified 3 years, 7 months ago by guytz72.
    Thread Starter guytz72

    (@guytz72)

    Oops, sorry disregard the last update above, that relates to a different issue!

    Still have issues getting items into the cart if I use the Woocommerce login process.

    Thread Starter guytz72

    (@guytz72)

    @imazed Do you have any other ideas about what can cause this? I am at a loss what to do and I am know I am loosing customers because of it.

    I know I’m not the only one as I’ve seen other post about it, but no resolutions.

    Thread Starter guytz72

    (@guytz72)

    You can close this now, I removed a setting for a cookie in the wp-config file and it now works. Can’t remember which one it was off the top of my head so if you have this issue message me and I’ll dig it out.

    mother.of.code

    (@imazed)

    The Mother of Code

    Hi there,

    Thanks for your update! I’ll go ahead and mark this topic as solved ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error adding items to Woocommerce cart’ is closed to new replies.