${function() {
const variantData = data.variant || {"id":"559618e0-6a4a-4298-a366-78284a5411c6","product_id":"8b0a4e90-9ab9-43d3-ac3c-ac629049d5f3","title":"12 12 12","weight_unit":"kg","inventory_quantity":100,"sku":"","barcode":"","position":1,"option1":"12 12 12","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":151.37,"min_quantity":1}],"weight":"0.38","compare_at_price":"201.82","price":"151.37","retail_price":"201.82","available":true,"url":"\/products\/free-shipping-yvonne-diamond-straight-3-bundles-weaves-with-5x5-top-closure?variant=559618e0-6a4a-4298-a366-78284a5411c6","available_quantity":100,"options":[{"name":"Length","value":"12 12 12"}],"off_ratio":"25","flashsale_info":{"variant_id":"559618e0-6a4a-4298-a366-78284a5411c6","product_id":"","quantity":0,"discount_id":"6179f681-f732-40c7-b376-72ab53ce02ae","limit_time":111474,"limit_buy":-1,"user_limit_buy":-1,"discount_sales":0,"discount_sales_rate":"0","discount_stock":100,"ends_at":1714463999,"starts_at":1685438570,"allow_oversold":"uncheck","allocation_method":"none","price":"151.37","compare_at_price":"201.82","discount_price":"151.37","customary_saved_price":"50.45","customary_off_ratio":"25","discount_saved_price":"50.45","discount_off_ratio":"25","use_before_price":false,"before_price":"0","title":"","properties":"","color_setting_promotional_copy":"SPECIAL OFFER","discount_quantity":0,"is_need_split":false},"sales":572};
const saveType = "percentage";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Length
: 12 12 12
${function(){
const optName = "Length";
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
$151.37
${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":"559618e0-6a4a-4298-a366-78284a5411c6","product_id":"8b0a4e90-9ab9-43d3-ac3c-ac629049d5f3","title":"12 12 12","weight_unit":"kg","inventory_quantity":100,"sku":"","barcode":"","position":1,"option1":"12 12 12","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":151.37,"min_quantity":1}],"weight":"0.38","compare_at_price":"201.82","price":"151.37","retail_price":"201.82","available":true,"url":"\/products\/free-shipping-yvonne-diamond-straight-3-bundles-weaves-with-5x5-top-closure?variant=559618e0-6a4a-4298-a366-78284a5411c6","available_quantity":100,"options":[{"name":"Length","value":"12 12 12"}],"off_ratio":"25","flashsale_info":{"variant_id":"559618e0-6a4a-4298-a366-78284a5411c6","product_id":"","quantity":0,"discount_id":"6179f681-f732-40c7-b376-72ab53ce02ae","limit_time":111474,"limit_buy":-1,"user_limit_buy":-1,"discount_sales":0,"discount_sales_rate":"0","discount_stock":100,"ends_at":1714463999,"starts_at":1685438570,"allow_oversold":"uncheck","allocation_method":"none","price":"151.37","compare_at_price":"201.82","discount_price":"151.37","customary_saved_price":"50.45","customary_off_ratio":"25","discount_saved_price":"50.45","discount_off_ratio":"25","use_before_price":false,"before_price":"0","title":"","properties":"","color_setting_promotional_copy":"SPECIAL OFFER","discount_quantity":0,"is_need_split":false},"sales":572};
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":"559618e0-6a4a-4298-a366-78284a5411c6","product_id":"8b0a4e90-9ab9-43d3-ac3c-ac629049d5f3","title":"12 12 12","weight_unit":"kg","inventory_quantity":100,"sku":"","barcode":"","position":1,"option1":"12 12 12","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":151.37,"min_quantity":1}],"weight":"0.38","compare_at_price":"201.82","price":"151.37","retail_price":"201.82","available":true,"url":"\/products\/free-shipping-yvonne-diamond-straight-3-bundles-weaves-with-5x5-top-closure?variant=559618e0-6a4a-4298-a366-78284a5411c6","available_quantity":100,"options":[{"name":"Length","value":"12 12 12"}],"off_ratio":"25","flashsale_info":{"variant_id":"559618e0-6a4a-4298-a366-78284a5411c6","product_id":"","quantity":0,"discount_id":"6179f681-f732-40c7-b376-72ab53ce02ae","limit_time":111474,"limit_buy":-1,"user_limit_buy":-1,"discount_sales":0,"discount_sales_rate":"0","discount_stock":100,"ends_at":1714463999,"starts_at":1685438570,"allow_oversold":"uncheck","allocation_method":"none","price":"151.37","compare_at_price":"201.82","discount_price":"151.37","customary_saved_price":"50.45","customary_off_ratio":"25","discount_saved_price":"50.45","discount_off_ratio":"25","use_before_price":false,"before_price":"0","title":"","properties":"","color_setting_promotional_copy":"SPECIAL OFFER","discount_quantity":0,"is_need_split":false},"sales":572};
return `
Sku : ${variantData && variantData.sku}
`
}()}