${function() {
const variantData = data.variant || {"id":"305293fe-b6f4-4dc8-bdb1-ebe91fc4fa37","product_id":"512e5c6a-c060-4633-91b9-eea1ffde23f4","title":"purple-3XL","weight_unit":"g","inventory_quantity":999,"sku":"1531143193064685569","barcode":"","position":5,"option1":"purple","option2":"3XL","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e10e0e52c30451633d355564eed53864.jpeg","path":"e10e0e52c30451633d355564eed53864.jpeg","width":800,"height":800,"alt":"7290146f1761232d46b48bd67cef1979","aspect_ratio":1},"wholesale_price":[{"price":17.5,"min_quantity":1}],"weight":"150","compare_at_price":"0","price":"17.5","retail_price":"0","available":true,"url":"\/products\/summer-surf-retro-casual-tee-uwfw?variant=305293fe-b6f4-4dc8-bdb1-ebe91fc4fa37","available_quantity":999999999,"options":[{"name":"Color","value":"purple"},{"name":"Size","value":"3XL"}],"off_ratio":0,"flashsale_info":[],"sales":5};
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
: purple
${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
: 3XL
${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
$17.50
${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":"305293fe-b6f4-4dc8-bdb1-ebe91fc4fa37","product_id":"512e5c6a-c060-4633-91b9-eea1ffde23f4","title":"purple-3XL","weight_unit":"g","inventory_quantity":999,"sku":"1531143193064685569","barcode":"","position":5,"option1":"purple","option2":"3XL","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e10e0e52c30451633d355564eed53864.jpeg","path":"e10e0e52c30451633d355564eed53864.jpeg","width":800,"height":800,"alt":"7290146f1761232d46b48bd67cef1979","aspect_ratio":1},"wholesale_price":[{"price":17.5,"min_quantity":1}],"weight":"150","compare_at_price":"0","price":"17.5","retail_price":"0","available":true,"url":"\/products\/summer-surf-retro-casual-tee-uwfw?variant=305293fe-b6f4-4dc8-bdb1-ebe91fc4fa37","available_quantity":999999999,"options":[{"name":"Color","value":"purple"},{"name":"Size","value":"3XL"}],"off_ratio":0,"flashsale_info":[],"sales":5};
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":"305293fe-b6f4-4dc8-bdb1-ebe91fc4fa37","product_id":"512e5c6a-c060-4633-91b9-eea1ffde23f4","title":"purple-3XL","weight_unit":"g","inventory_quantity":999,"sku":"1531143193064685569","barcode":"","position":5,"option1":"purple","option2":"3XL","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e10e0e52c30451633d355564eed53864.jpeg","path":"e10e0e52c30451633d355564eed53864.jpeg","width":800,"height":800,"alt":"7290146f1761232d46b48bd67cef1979","aspect_ratio":1},"wholesale_price":[{"price":17.5,"min_quantity":1}],"weight":"150","compare_at_price":"0","price":"17.5","retail_price":"0","available":true,"url":"\/products\/summer-surf-retro-casual-tee-uwfw?variant=305293fe-b6f4-4dc8-bdb1-ebe91fc4fa37","available_quantity":999999999,"options":[{"name":"Color","value":"purple"},{"name":"Size","value":"3XL"}],"off_ratio":0,"flashsale_info":[],"sales":5};
return `
`
}()}