Add to cart no longer works - by andyreece

Solved6 replies2 participantsUpdated by Robert Hall

  • Avatar: andyreece
    andyreece
    Participant

    Hi

    Since updating to v.4.1 the “add to cart” doesn’t work and add to the mini cart
    You have to physically go to the product page and add to the cart

    Many thanks
    Andy

    Please, contact administrator
    for this information.

    6 Answers

    Avatar: andyreece
    andyreece
    Participant

    It works on my localhost and the staging site but not on the live server
    I think it may be to do with SSL

    Please, contact administrator
    for this information.
    Avatar: Robert Hall
    Robert Hall
    Participant

    Hello,

    Please provide us with wp-admin and FTP credentials in Private Content.

    Regards,
    Robert Hall

    Avatar: andyreece
    andyreece
    Participant

    Hi

    It’s not SSL I’ve narrowed it down to caching
    I’m using WP Engine and the pages are cached, so when the code in script.js runs to get the updated page

    
    jQuery.get(this_pageIe, function(data) {
    	var newCartHtml = jQuery(data).find('.widget_shopping_cart').html();
    	jQuery('.widget_shopping_cart').html(newCartHtml);         
    });

    Is getting the same page it’s on, this is cached so returns no update
    Also when you then go to a new page or refresh then the cart comes back empty

    Cheers
    Andy

    Avatar: Robert Hall
    Robert Hall
    Participant

    Hello,

    Does it works when WP Engine plugin is disabled?

    We need wp-admin and FTP credentials to check it more deeply. Please provide them in Private Content.

    Regards,
    Robert Hall

    Avatar: andyreece
    andyreece
    Participant

    Hi

    I have now resolved this with WP Engine by removing the necessary Woocommerce pages from the server level cache and also Woocommerce cookies as these were being cached as well

    All is now fine

    Cheers
    Andy

    Avatar: Robert Hall
    Robert Hall
    Participant

    We’re glad to hear it.
    If you have any questions feel free to contact us.

    Regards,
    Robert Hall

The issue related to '‘Add to cart no longer works’' has been successfully resolved, and the topic is now closed for further responses