Checkout: WP Super Cache

For everyone who has tried to use the WordPress Shopping Cart plugin with the WP Super Cache plugin you will know that they conflict. When both plugins are active you won’t be able to add any items to your cart. No matter what you do or how many items you add it will just bring back the message saying, “Cart Empty“.

Issue

The reason this issue happens is perfectly valid. WP Super Cache transparently stores data the first time it is presented with it so that next time it gets that data it doesn’t have to load it from the internet, it simply recalls what it stored.

So, when first using the cart it will be empty because on first use you wouldn’t have added any items prior to that. So WP Super Cache stores that data which shows the cart as empty, once you have added items to the cart and you go back to view the cart, it’s still empty. This is because WP Super Cache is loading the old cart, it over rides the new cart which actually has items in it. So items are being added, your just being shown the old, empty cart.

It was also brought to or attention that both our Shopping Cart plugin and the WP Super Cache plugin enable GZIP compression on your WordPress site. This causes a compression conflict.

Solution

There is actually a really simple solution to this issue. It’s as simple as adding 2 words to a setting. You need to change the rules of the WP Super Cache plugin to not store cache for the shopping cart.

Go to Settings > Super Cache > Advanced from the WordPress menu item. Now add the part of the URL of the Shopping Cart page like this:


click to enlarge

Once your done just click the ‘Save Strings‘ button in order to keep your changes. This should now stop WP Super Cache loading or storing any data on the Shopping Cart. In turn it will stop loading the empty cart even if items are in it.

The solution for Gzip compression is to turn it off in the plugin.

To disable Gzip compression in the Shopping Cart plugin, go to Checkout > Configuration > General Configuration. The very last setting named “Enable Gzip Compression” can be set to “No” and then you must save the configuration.

Table of Contents