Your cart is reserved for
${data.mm}m
${data.ss}s
!
${data.line_items.map(item => {
return `
${item.options.map(o => `
${o.name}: ${o.value}
`).join('')}
${(item.parsedProperties || []).map((propertie)=>{
if (propertie.isImage){
return `
${propertie.name}: View image `
}else{
return `
${propertie.name}: ${propertie.value}
`
}
}).join('')}
*${item.quantity}
${
(item.discount_applications || []).map(discount_item => {
const discount_item_amount = discount_item.discount_amount || discount_item.amount || '';
return `
${discount_item.title}
(-)
`
}).join('')
}
`;
}).join('')}
${function() {
const freeAmount = 399;
const totalPrice = data?.total_price || data?.cart?.total_price || 0;
const amountDiff = freeAmount - totalPrice;
const percentDiff = (amountDiff > 0 ? (totalPrice / freeAmount * 100).toFixed(2) : 100) + '%';
const spendTip = "Buy {amount} more to enjoy FREE Shipping";
let tipText = "Your order is free delivery";
if (amountDiff > 0) {
tipText = spendTip.replace('{amount}', ``);
}
return `
`;
}()}
${data.total_discount > 0 ? (
`
${data.discount_applications.length > 0 && data.discount_applications.map(item => {
return `
${item.title}:
`
}).join('')}
`
) : ''}
Taxes and shipping calculated at checkout