${function() {
const variantData = data.variant || {"id":"4f673299-c30b-4f40-885f-157cc8ea4b4b","product_id":"17bc57c5-d625-4d82-8b2c-15d92303f3fc","title":"Pink-Onesize","weight_unit":"kg","inventory_quantity":9990,"sku":"DF1003-Pink-Onesize","barcode":"","position":3,"option1":"Pink","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b1b5a77f51bcac24ec32fbf1a8cf8845.jpeg","path":"b1b5a77f51bcac24ec32fbf1a8cf8845.jpeg","width":800,"height":800,"alt":"gothic Belt Harness, devil harness, punk belt harness, goth garter, black punk harness, chain belt goth harness, chain black harness, body harness belt, fashion harness belt, chest harness, full body garter, star and moon gothich harness, chain belt, leather harness, Goth Belts & Buckles","aspect_ratio":1},"wholesale_price":[{"price":39.99,"min_quantity":1}],"weight":"0.7","compare_at_price":"54.99","price":"39.99","retail_price":"54.99","available":true,"url":"\/products\/chasing-younger-yourself-belt-harness?variant=4f673299-c30b-4f40-885f-157cc8ea4b4b","available_quantity":9990,"options":[{"name":"Color","value":"Pink"},{"name":"Size","value":"Onesize"}],"off_ratio":27,"flashsale_info":[],"sales":124};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Color
: Pink
${function(){
const optName = "Color";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (': ' + optionValue) : '';
return `
${optionValueText}
`
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Size
: Onesize
${function(){
const optName = "Size";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (': ' + optionValue) : '';
return `
${optionValueText}
`
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Add to cart
$39.99
${function(){
const wholesale_enabled = false;
const qty = data.quantity || 1;
const currentSelectVariant = data.variant;
const defaultVariant = (data.product && data.product.variants && data.product.variants[0]);
const productVariant = {"id":"4f673299-c30b-4f40-885f-157cc8ea4b4b","product_id":"17bc57c5-d625-4d82-8b2c-15d92303f3fc","title":"Pink-Onesize","weight_unit":"kg","inventory_quantity":9990,"sku":"DF1003-Pink-Onesize","barcode":"","position":3,"option1":"Pink","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b1b5a77f51bcac24ec32fbf1a8cf8845.jpeg","path":"b1b5a77f51bcac24ec32fbf1a8cf8845.jpeg","width":800,"height":800,"alt":"gothic Belt Harness, devil harness, punk belt harness, goth garter, black punk harness, chain belt goth harness, chain black harness, body harness belt, fashion harness belt, chest harness, full body garter, star and moon gothich harness, chain belt, leather harness, Goth Belts & Buckles","aspect_ratio":1},"wholesale_price":[{"price":39.99,"min_quantity":1}],"weight":"0.7","compare_at_price":"54.99","price":"39.99","retail_price":"54.99","available":true,"url":"\/products\/chasing-younger-yourself-belt-harness?variant=4f673299-c30b-4f40-885f-157cc8ea4b4b","available_quantity":9990,"options":[{"name":"Color","value":"Pink"},{"name":"Size","value":"Onesize"}],"off_ratio":27,"flashsale_info":[],"sales":124};
const variantData = currentSelectVariant || defaultVariant || productVariant;
const wholesale_price = variantData.wholesale_price || [];
if(wholesale_enabled && wholesale_price.length > 0) {
let wholesaleIndex = wholesale_price.findIndex(item => {
return item.min_quantity > qty;
});
if(wholesaleIndex < 0){
wholesaleIndex = wholesale_price.length - 1;
}else if(wholesaleIndex > 0){
wholesaleIndex = wholesaleIndex - 1;
}
const wholesalePrice = wholesale_price[wholesaleIndex] || '';
return `
`
}else {
const price = variantData && variantData.price;
return price != undefined ? `
` : ' ';
}
}()}
Buy now
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"4f673299-c30b-4f40-885f-157cc8ea4b4b","product_id":"17bc57c5-d625-4d82-8b2c-15d92303f3fc","title":"Pink-Onesize","weight_unit":"kg","inventory_quantity":9990,"sku":"DF1003-Pink-Onesize","barcode":"","position":3,"option1":"Pink","option2":"Onesize","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b1b5a77f51bcac24ec32fbf1a8cf8845.jpeg","path":"b1b5a77f51bcac24ec32fbf1a8cf8845.jpeg","width":800,"height":800,"alt":"gothic Belt Harness, devil harness, punk belt harness, goth garter, black punk harness, chain belt goth harness, chain black harness, body harness belt, fashion harness belt, chest harness, full body garter, star and moon gothich harness, chain belt, leather harness, Goth Belts & Buckles","aspect_ratio":1},"wholesale_price":[{"price":39.99,"min_quantity":1}],"weight":"0.7","compare_at_price":"54.99","price":"39.99","retail_price":"54.99","available":true,"url":"\/products\/chasing-younger-yourself-belt-harness?variant=4f673299-c30b-4f40-885f-157cc8ea4b4b","available_quantity":9990,"options":[{"name":"Color","value":"Pink"},{"name":"Size","value":"Onesize"}],"off_ratio":27,"flashsale_info":[],"sales":124};
return `
`
}()}
${function() {
const postageFreeAmount = 100;
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 `
`;
}()}