Redemption Print Short Sleeve T-Shirt
${function() {
const variantData = data.variant || {"id":"8f166037-24bb-4998-9073-9bfe6c9c6725","product_id":"f7e87bc5-9b54-401a-920e-340d128f6e38","title":"Black-S","weight_unit":"kg","inventory_quantity":980,"sku":"XHIHxfxJ1-Black-S","barcode":"","position":1,"option1":"Black","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5b0b6f11a1aa1da902de5265d68a8624.jpeg","path":"5b0b6f11a1aa1da902de5265d68a8624.jpeg","width":1440,"height":1440,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":23.95,"min_quantity":1}],"weight":"0","compare_at_price":"49.99","price":"23.95","retail_price":"49.99","available":true,"url":"\/products\/redemption-print-short-sleeve-t-shirt185fcbdd-1b52-457c-a226-4dcb559dc6ae?variant=8f166037-24bb-4998-9073-9bfe6c9c6725","available_quantity":999999999,"options":[{"name":"Color","value":"Black"},{"name":"Size","value":"S"}],"off_ratio":52,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `-`
}
`;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Product was out of stock.
Product is unavailable.
${function() {
const minDays = parseInt('7');
const maxDays = parseInt('14');
const customText = "Estimated Delivery\uff1a{min_date} - {max_date}";
const minDate = new Date(Date.now() + (minDays * 86400000));
const maxDate = new Date(Date.now() + (maxDays * 86400000));
const formatDate = (minDate.getFullYear() == maxDate.getFullYear() && minDate.getFullYear() == new Date().getFullYear())
? new Intl.DateTimeFormat('en', { month: 'short', day: '2-digit' })
: new Intl.DateTimeFormat('en', { month: 'short', day: '2-digit', year: 'numeric' });
const tipText = customText.replace(/\{min_date\}/g, '' + formatDate.format(minDate) + '')
.replace(/\{max_date\}/g, '' + formatDate.format(maxDate) + '');
return `
${tipText}
`;
}()}
${function() {
const postageFreeAmount = 99;
const custom_text = "Buy {amount} more to enjoy FREE Shipping";
const totalPrice = +data.total_price;
const diffPrice = postageFreeAmount - totalPrice;
const percentDiff = (diffPrice > 0 ? (totalPrice / postageFreeAmount * 100) : 100) + '%';
let tipText = "Your order is free delivery";
if (diffPrice > 0) {
tipText = custom_text.replace('{amount}', `
`);
}
return `
`;
}()}