Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a div that displays the total amount of products the customer has in their cart, however this isn't updating as I have caching on (W3 Total Cache).

Is there a workaround for this?

Cheers, Steve

share|improve this question

closed as off-topic by Pieter Goosen, ialocin, birgire, TheDeadMedic, mrwweb Aug 26 at 18:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – Pieter Goosen, ialocin, birgire, TheDeadMedic, mrwweb
If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers 4

Read the WooCommerce docs. I've run in to this before, and the following pages cannot be cached:

  • Cart
  • My Account
  • Change Password
  • Edit Address
  • View Order
  • Checkout
  • Pay
  • Order Received
share|improve this answer

I believe you do not need to exclude your cart and other pages listed. There is a note at the bottom of the doc you linked to that states:

Note, WC 1.4.2+ sets the DONOTCACHEPAGE constant which should mean you can skip this step

share|improve this answer

You would need to use what's called "fragment caching" to regenerate only part of the page each time. http://css-tricks.com/wordpress-fragment-caching-revisited/

share|improve this answer

First, try these common Solutions that have worked for others:

Disable your caching plugin (which can cause the JS to stop working) and see if that fixes it

Try using a different browser but as a user, not ADMIN

Go to your WooCommerce settings page and Untick "Prepend product permalinks with shop base page (shop)"

Allow your browser to accept cookies and make sure javascript is enabled

share|improve this answer
    
Don't use bold letters in the manner you did. This is the same as shouting, which is not allowed and bad manners –  Pieter Goosen Apr 26 at 10:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.