${function() {
const variantData = data.variant || {"id":"a87cd700-a20b-4de4-a6af-65d3abd806b5","product_id":"04abd4bb-6d5c-42b5-bb6d-b78527f21a4e","title":"blue-L","weight_unit":"g","inventory_quantity":999,"sku":"1490618086294863873","barcode":"","position":3,"option1":"blue","option2":"L","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3ae9aa65a27ea2d0960ddab94e0b7eba.jpeg","path":"3ae9aa65a27ea2d0960ddab94e0b7eba.jpeg","width":1000,"height":1000,"alt":"085bde7721ef06cc441f2388e182053d","aspect_ratio":1},"wholesale_price":[{"price":35.56,"min_quantity":1}],"weight":"300","compare_at_price":"0","price":"35.56","retail_price":"0","available":true,"url":"\/products\/take-care-of-yourself-print-womens-hoodie?variant=a87cd700-a20b-4de4-a6af-65d3abd806b5","available_quantity":999999999,"options":[{"name":"Color","value":"blue"},{"name":"Size","value":"L"}],"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
: L
${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
$35.56
${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":"a87cd700-a20b-4de4-a6af-65d3abd806b5","product_id":"04abd4bb-6d5c-42b5-bb6d-b78527f21a4e","title":"blue-L","weight_unit":"g","inventory_quantity":999,"sku":"1490618086294863873","barcode":"","position":3,"option1":"blue","option2":"L","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3ae9aa65a27ea2d0960ddab94e0b7eba.jpeg","path":"3ae9aa65a27ea2d0960ddab94e0b7eba.jpeg","width":1000,"height":1000,"alt":"085bde7721ef06cc441f2388e182053d","aspect_ratio":1},"wholesale_price":[{"price":35.56,"min_quantity":1}],"weight":"300","compare_at_price":"0","price":"35.56","retail_price":"0","available":true,"url":"\/products\/take-care-of-yourself-print-womens-hoodie?variant=a87cd700-a20b-4de4-a6af-65d3abd806b5","available_quantity":999999999,"options":[{"name":"Color","value":"blue"},{"name":"Size","value":"L"}],"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":"a87cd700-a20b-4de4-a6af-65d3abd806b5","product_id":"04abd4bb-6d5c-42b5-bb6d-b78527f21a4e","title":"blue-L","weight_unit":"g","inventory_quantity":999,"sku":"1490618086294863873","barcode":"","position":3,"option1":"blue","option2":"L","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3ae9aa65a27ea2d0960ddab94e0b7eba.jpeg","path":"3ae9aa65a27ea2d0960ddab94e0b7eba.jpeg","width":1000,"height":1000,"alt":"085bde7721ef06cc441f2388e182053d","aspect_ratio":1},"wholesale_price":[{"price":35.56,"min_quantity":1}],"weight":"300","compare_at_price":"0","price":"35.56","retail_price":"0","available":true,"url":"\/products\/take-care-of-yourself-print-womens-hoodie?variant=a87cd700-a20b-4de4-a6af-65d3abd806b5","available_quantity":999999999,"options":[{"name":"Color","value":"blue"},{"name":"Size","value":"L"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
`
}()}