-
Notifications
You must be signed in to change notification settings - Fork 44
Description
For some time I've used
utils.api.cart.getContent({ template: 'custom/json/cart-product-ids' ... }
with the following code in that template
{{ json cart.items }}
So I can take the response inside the callback of utils.api.cart.getContent and parse json to get that cart contents.
Sometime yesterday the server started appending a <script> tag the end of the response with analytics.track('Product Added'... and so on inside which broke our site/ability to put things in the cart since the script is trying to parse the response as JSON.
Is there some way we can send an option parameter to ask for a json response (vs html) or somehow as the library here to not append that script tag as if the response were HTML? If this exists in the options parameter now, it would be great to see some explanation of what those options are in the docs since
https://developer.bigcommerce.com/stencil-docs/ZG9jOjIyMDcyMA-stencil-utils#get-cart
Thanks