fetch('/cart.js') .then(response => response.json()) .then(cart => { if ( typeof window.BOLD !== 'undefined' && typeof window.BOLD.common !== 'undefined' && typeof window.BOLD.common.cartDoctor !== 'undefined' ) { cart = window.BOLD.common.cartDoctor.fix(cart); } // Rest of your code here }) .catch(error => { console.log('Error fetching cart:', error); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter