Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1381656

    PPoint
    Participant

    Hello, I have a question about the AJAX Add To Cart functionality. The AJAX is not working when the cart is empty. Here is where it is not working:

    http://uattend.wpengine.com/purchase/

    If the cart is empty and you click any of the product buttons(see screenshot below), the product should be added to the cart, but it doesn’t show up in the cart. If you refresh the page it will show in the cart, but we need to have it appear in the cart right away.

    If there is already an item in the cart, everything works the way we need it. It’s only when the cart says empty.

    #1381858

    Jade
    Moderator

    Hi there,

    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.

    #1381901

    PPoint
    Participant

    Hey there. Just tried that. Deactivated all the plugins besides woocommerce and it was still acting the same way as described above

    #1382314

    Darshana
    Moderator

    Hi 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:

    – Link to your site
    – 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.

    #1383254

    PPoint
    Participant
    This reply has been marked as private.
    #1383796

    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! I have check the page and I can see that you are using a woocommerce cart shortcode [woocommerce_cart] as shown here: http://prntscr.com/ecoaiu. Please keep in mind that this shortcode, [woocommerce_cart], is a default shortcode of WooCommerce which would show the cart page. For referrence, please check it here: https://docs.woocommerce.com/document/woocommerce-shortcodes/

    Be advised that no AJAX will be able to load products to an empty cart and update since cart pages don’t show products unless cart has an item.

    Hope this explains it briefly.

    #1384552

    PPoint
    Participant

    Thanks! I replaced the shortcode with the woocomm cart widget and get everything working. Thanks for the help.

    #1384563

    Prasant Rai
    Moderator

    You are most welcome. 🙂