{{c.title}}

Not Available

{{c.title}}

{{toMoney(c.variant.compareAtPrice)}} {{toMoney(c.variant.price)}}
{{toMoney(c.variant.price)}}
Out of stock

{{opt.name}}: {{opt.value}}

{{dis.discountApplication.title}}

remove
inputqty(index, e.target.value)" class="under-quantity number" type="text">

{{toMoney(c.subtotalperitem)}}

{{toMoney(c.subtotalperitemfinal)}}

{{toMoney(c.subtotalperitem)}}

{{toMoney(c.subtotalperitem)}}

Subtotal: {{toMoney(cart.checkout.subtotalPrice)}}

Discounts will be applied at checkout

Taxes and shipping calculated at checkout

Please remove out of stock items.

You don't have any item in your cart.

Loading...
`; new Vue({ el: '#ShopifyCartShortcodeVue', template: ShopifyCartShortcodeTemplate, data() { return { cart: { loading: false, items: [], checkout: null, updateloading: false, } } }, computed: { getCart() { return this.cart.items.map(row => { row.onsale = row.variant && (row.variant.compareAtPrice && (row.variant.compareAtPrice > row.variant.price)); row.subtotalperitem = row.variant ? row.variant.price*row.quantity : 0; var discounts = 0; var discalloc = row.discountAllocations.map(dr => { discounts+=parseFloat(dr.allocatedAmount.amount); }); row.discounted = discounts; row.subtotalperitemfinal = row.subtotalperitem-row.discounted; return row; }); }, getRemoveLineItems() { return this.getCart.filter(row => row.quantity row.id); }, getUpdatedLineItems() { return this.getCart.filter(row => row.quantity > 0).map(row => { return { id: row.id, quantity: parseInt(row.quantity) } }); }, disabledCheckoutButton() { return this.cart.items.filter(row => !row.variant.available).length; } }, async mounted() { this.cart.loading = true; await this.loadCartItems(); this.cart.loading = false; const e = this; document.addEventListener("ShopifyCartUpdate", function(response) { if(response.checkout) { e.$set(e.cart, 'items', [...response.checkout.lineItems]); e.$set(e.cart, 'checkout', {...response.checkout}); } else { e.$set(e.cart, 'items', []); e.$set(e.cart, 'checkout', null); } }); }, methods: { toMoney(value) { return ShopifyMoneyv2(value); }, srcset(src) { return ShopifyImageSrcSet(src); }, async increment(index) { let quantity = this.cart.items[index].quantity; this.setCartItem(index, { quantity: quantity+1 }); await this.updateCartItems(); }, async decrement(index) { let quantity = this.cart.items[index].quantity; quantity = quantity-1; if(quantity