Static Caching with Cart #974
-
Hey there, wondered if I could get some guidance on how to utilise static caching but keep dynamic content. For example when I complete checkout on an order and clear the cart, it does start a new cart however the {{ sc:cart:id }} is cached and is returning the previous cart. The issue resolves after clearing static caching. I have tried using statamic's {{ no_cache }} tag but I find this quite intermittent. So my question is, is it possible to retrieve the current cart from my controller when I make the API call, rather than passing it through my vue template? Any help is appreciated, thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, there's a "cart index" endpoint you can use to get the customer's current cart. The URL is |
Beta Was this translation helpful? Give feedback.
Yes, there's a "cart index" endpoint you can use to get the customer's current cart. The URL is
/!/simple-commerce/cart