New bucket cap, basin cap, sun protection cap
${function() {
const variantData = data.variant || {"id":"d4cbcb8c-d2bf-4be3-8f83-7b01dc55c8c7","product_id":"55904a42-67b8-4f1d-b9d7-72f7c9dfe1af","title":"black","weight_unit":"kg","inventory_quantity":73,"sku":"\u5468830-35-black-A0016384","barcode":"","position":1,"option1":"black","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/2d5a81475de61b4d7bd408558653ec06.jpg","path":"2d5a81475de61b4d7bd408558653ec06.jpg","width":1280,"height":910,"alt":"","aspect_ratio":1.4065934065934067},"wholesale_price":[{"price":13.8,"min_quantity":1}],"weight":"0.2","compare_at_price":"0","price":"13.8","retail_price":"0","available":true,"url":"\/products\/new-bucket-cap-basin-cap-sun-protection-cap?variant=d4cbcb8c-d2bf-4be3-8f83-7b01dc55c8c7","available_quantity":73,"options":[{"name":"colour","value":"black"}],"off_ratio":0,"flashsale_info":[],"sales":61};
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}
`
}()}
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"d4cbcb8c-d2bf-4be3-8f83-7b01dc55c8c7","product_id":"55904a42-67b8-4f1d-b9d7-72f7c9dfe1af","title":"black","weight_unit":"kg","inventory_quantity":73,"sku":"\u5468830-35-black-A0016384","barcode":"","position":1,"option1":"black","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/2d5a81475de61b4d7bd408558653ec06.jpg","path":"2d5a81475de61b4d7bd408558653ec06.jpg","width":1280,"height":910,"alt":"","aspect_ratio":1.4065934065934067},"wholesale_price":[{"price":13.8,"min_quantity":1}],"weight":"0.2","compare_at_price":"0","price":"13.8","retail_price":"0","available":true,"url":"\/products\/new-bucket-cap-basin-cap-sun-protection-cap?variant=d4cbcb8c-d2bf-4be3-8f83-7b01dc55c8c7","available_quantity":73,"options":[{"name":"colour","value":"black"}],"off_ratio":0,"flashsale_info":[],"sales":61};
return `
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
${function() {
const minInventory = parseInt('10');
const maxInventory = parseInt('50');
const randomInventory = Math.round(Math.random() * (maxInventory - minInventory)) + minInventory;
const customText = "Only {stock} item(s) left in stock!".replace(/\{stock\}/g, '' + randomInventory + '');
const barWidth = (randomInventory / maxInventory) * 100 + '%';
return `
`;
}()}