${function() {
const variantData = data.variant || {"id":"4398f91f-d456-4f4c-a797-fb99f85d5205","product_id":"19f77bef-e5aa-4e33-8995-0f31cc22706c","title":"blue-S","weight_unit":"g","inventory_quantity":999,"sku":"f176aac0-3ae7-46b3-9cc2-94515b8413c4","barcode":"","position":1,"option1":"blue","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/90c4d15d35bf9bfe68357435a4787141.jpeg","path":"90c4d15d35bf9bfe68357435a4787141.jpeg","width":780,"height":994,"alt":"7890e4c69295a7a29eca74d16061520f","aspect_ratio":0.7847082494969819},"wholesale_price":[{"price":24.44,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"24.44","retail_price":"0","available":true,"url":"\/products\/geometric-colorblock-short-sleeved-polo-shirt?variant=4398f91f-d456-4f4c-a797-fb99f85d5205","available_quantity":999999999,"options":[{"name":"Color","value":"blue"},{"name":"Size","value":"S"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Free Shipping Order over $89
Color
: blue
${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
: 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}
`
}()}
Add to cart
$24.44
${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":"4398f91f-d456-4f4c-a797-fb99f85d5205","product_id":"19f77bef-e5aa-4e33-8995-0f31cc22706c","title":"blue-S","weight_unit":"g","inventory_quantity":999,"sku":"f176aac0-3ae7-46b3-9cc2-94515b8413c4","barcode":"","position":1,"option1":"blue","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/90c4d15d35bf9bfe68357435a4787141.jpeg","path":"90c4d15d35bf9bfe68357435a4787141.jpeg","width":780,"height":994,"alt":"7890e4c69295a7a29eca74d16061520f","aspect_ratio":0.7847082494969819},"wholesale_price":[{"price":24.44,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"24.44","retail_price":"0","available":true,"url":"\/products\/geometric-colorblock-short-sleeved-polo-shirt?variant=4398f91f-d456-4f4c-a797-fb99f85d5205","available_quantity":999999999,"options":[{"name":"Color","value":"blue"},{"name":"Size","value":"S"}],"off_ratio":0,"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 {
const price = variantData && variantData.price;
return price != undefined ? `
` : ' ';
}
}()}
Buy now
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"4398f91f-d456-4f4c-a797-fb99f85d5205","product_id":"19f77bef-e5aa-4e33-8995-0f31cc22706c","title":"blue-S","weight_unit":"g","inventory_quantity":999,"sku":"f176aac0-3ae7-46b3-9cc2-94515b8413c4","barcode":"","position":1,"option1":"blue","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/90c4d15d35bf9bfe68357435a4787141.jpeg","path":"90c4d15d35bf9bfe68357435a4787141.jpeg","width":780,"height":994,"alt":"7890e4c69295a7a29eca74d16061520f","aspect_ratio":0.7847082494969819},"wholesale_price":[{"price":24.44,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"24.44","retail_price":"0","available":true,"url":"\/products\/geometric-colorblock-short-sleeved-polo-shirt?variant=4398f91f-d456-4f4c-a797-fb99f85d5205","available_quantity":999999999,"options":[{"name":"Color","value":"blue"},{"name":"Size","value":"S"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
`
}()}