${function() {
const variantData = data.variant || {"id":"e50263a6-7632-4760-9f3e-63525f8bc6e7","product_id":"dd22eb80-4d52-4be6-86f7-40590ce92d9d","title":"Pink 1 Piece-S-BUY 1","weight_unit":"kg","inventory_quantity":1000,"sku":"ES1317209-\u026b\u04bb\u05bbS","barcode":"","position":1,"option1":"Pink 1 Piece","option2":"S","option3":"BUY 1","note":"","image":{"src":"\/\/img.staticdj.com\/c439f3236a79d1f5917188edc4d7d0cc.jpeg","path":"c439f3236a79d1f5917188edc4d7d0cc.jpeg","width":640,"height":640,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":10.99,"min_quantity":1}],"weight":"0","compare_at_price":"18.99","price":"10.99","retail_price":"18.99","available":true,"url":"\/products\/compression-sleeve?variant=e50263a6-7632-4760-9f3e-63525f8bc6e7","available_quantity":1000,"options":[{"name":"style","value":"Pink 1 Piece"},{"name":"size","value":"S"},{"name":"\ud83d\udd25Buy More Save More\ud83d\udd25","value":"BUY 1"}],"off_ratio":42,"flashsale_info":[],"sales":0};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Style
: Pink 1 Piece
${function(){
const optName = "style";
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
: S
${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}
`
}()}
🔥Buy More Save More🔥
: BUY 1
${function(){
const optName = "🔥Buy More Save More🔥";
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
$10.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":"e50263a6-7632-4760-9f3e-63525f8bc6e7","product_id":"dd22eb80-4d52-4be6-86f7-40590ce92d9d","title":"Pink 1 Piece-S-BUY 1","weight_unit":"kg","inventory_quantity":1000,"sku":"ES1317209-\u026b\u04bb\u05bbS","barcode":"","position":1,"option1":"Pink 1 Piece","option2":"S","option3":"BUY 1","note":"","image":{"src":"\/\/img.staticdj.com\/c439f3236a79d1f5917188edc4d7d0cc.jpeg","path":"c439f3236a79d1f5917188edc4d7d0cc.jpeg","width":640,"height":640,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":10.99,"min_quantity":1}],"weight":"0","compare_at_price":"18.99","price":"10.99","retail_price":"18.99","available":true,"url":"\/products\/compression-sleeve?variant=e50263a6-7632-4760-9f3e-63525f8bc6e7","available_quantity":1000,"options":[{"name":"style","value":"Pink 1 Piece"},{"name":"size","value":"S"},{"name":"\ud83d\udd25Buy More Save More\ud83d\udd25","value":"BUY 1"}],"off_ratio":42,"flashsale_info":[],"sales":0};
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 {
return `
`
}
}()}
Buy now
Product was out of stock.
Product is unavailable.