'ETCHED' JEANS
${function() {
const variantData = data.variant || {"id":"0fd5a019-1bf0-42d5-bb67-49da42ea4cae","product_id":"1b8de839-4554-4538-9faf-c4bf698a18ef","title":"S-Blue","weight_unit":"kg","inventory_quantity":902,"sku":"ES--A00310603-S-Blue","barcode":"","position":1,"option1":"S","option2":"Blue","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3f4cb80533841f270cf0e3ef7019e05d.jpg","path":"3f4cb80533841f270cf0e3ef7019e05d.jpg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":56.95,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"56.95","retail_price":"0","available":true,"url":"\/products\/etched-jeans?variant=0fd5a019-1bf0-42d5-bb67-49da42ea4cae","available_quantity":999999999,"options":[{"name":"Size","value":"S"},{"name":"Color","value":"Blue"}],"off_ratio":0,"flashsale_info":[],"sales":107};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Size:
S
${function(){
return `${data.value} `;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Color:
Blue
${function(){
return `${data.value} `;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Add to cart
Buy now
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 `
`;
}()}