Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The cart is empty #30

Open
kevin25 opened this issue Sep 7, 2015 · 1 comment
Open

The cart is empty #30

kevin25 opened this issue Sep 7, 2015 · 1 comment

Comments

@kevin25
Copy link

kevin25 commented Sep 7, 2015

I used your varnish vcl for my Wooecommerce. The cart is empty whenever i add anything. I tried to disable ajax request but no luck. Here are my exeptions:

    ### REMOVE IT IF YOU DO NOT USE WOOCOMMERCE ###
    if (req.url ~ "/(cart|my-account|checkout|addons|/?(add-to-cart=|added-to-cart=))") {
            return (pass);
    }
    if (req.url ~ "/product/*$") {
            return (pass);
    }

     if ( req.url ~ "/?add-to-cart=" ) {
             return (pass);
     }
    if (req.http.X-Requested-With == "XMLHttpRequest") {
            return(pass);
    }
@Oyabi
Copy link
Contributor

Oyabi commented Sep 7, 2015

Hi,
Maybe try that:

# WooCommerce: The code below makes sure the AJAX "add to cart" function works 
set req.url = regsub(req.url, "add-to-cart=\d+_\d+&", "");

I think it's the same problem than #29 (comment)
I'm sorry but I haven't the solution. :(
Try to post to Varnish forum and if you get a response add a comment here. =)

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants