${function() {
const variantData = data.variant || {"id":"c2c4e81c-5723-44bb-8f75-9ac4aeadea39","product_id":"cb10ea35-49fe-4ce0-93ca-2eb539d2a2c7","title":"50-Piece Button Set","weight_unit":"g","inventory_quantity":1,"sku":"LE90554860A1","barcode":"","position":1,"option1":"50-Piece Button Set","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/1a5681d880be9c7088b5b682a6ccf85c.jpeg","path":"1a5681d880be9c7088b5b682a6ccf85c.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":14.99,"min_quantity":1}],"weight":"0","compare_at_price":"29.99","price":"14.99","retail_price":"29.99","available":true,"url":"\/products\/seqfgt?variant=c2c4e81c-5723-44bb-8f75-9ac4aeadea39","available_quantity":999999999,"options":[{"name":"Available Sets","value":"50-Piece Button Set"}],"off_ratio":"50","flashsale_info":{"variant_id":"c2c4e81c-5723-44bb-8f75-9ac4aeadea39","product_id":"","quantity":0,"discount_id":"","limit_time":0,"limit_buy":0,"user_limit_buy":0,"discount_sales":0,"discount_sales_rate":"","discount_stock":0,"ends_at":0,"starts_at":0,"allow_oversold":"","allocation_method":"","price":"14.99","compare_at_price":"","discount_price":"14.99","customary_saved_price":"","customary_off_ratio":"","discount_saved_price":"","discount_off_ratio":"50","use_before_price":false,"before_price":"","title":"","properties":"","color_setting_promotional_copy":"","discount_quantity":0,"is_need_split":false},"sales":0};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ``
)}
`;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
${function() {
const postageFreeAmount = 30;
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 `
`;
}()}
Product was out of stock.
Product is unavailable.