${function() {
const variantData = data.variant || {"id":"1f8cc095-9b57-416d-9400-8c5c01ff4fdc","product_id":"9a870c47-9144-4214-a096-18f1c8946280","title":"Red-7 Inche","weight_unit":"kg","inventory_quantity":1000,"sku":"WE1937375-\u7ea2\u8584\u6b3e7\u516c\u5236","barcode":"","position":1,"option1":"Red","option2":"7 Inche","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d248d7fb825096337a21cd7824011125.jpeg","path":"d248d7fb825096337a21cd7824011125.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":22.97,"min_quantity":1}],"weight":"0","compare_at_price":"36.99","price":"22.97","retail_price":"36.99","available":true,"url":"\/products\/for-carpenter-tri-square-line-scriber-saw-guide98ba7c17-2a40-49b7-8bd0-dcb80849b23f?variant=1f8cc095-9b57-416d-9400-8c5c01ff4fdc","available_quantity":999999999,"options":[{"name":"Color","value":"Red"},{"name":"Size","value":"7 Inche"}],"off_ratio":38,"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 + '%'
: ` `
)}
`;
}()}
Color
: Red
${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
: 7 Inche
${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
$22.97
${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":"1f8cc095-9b57-416d-9400-8c5c01ff4fdc","product_id":"9a870c47-9144-4214-a096-18f1c8946280","title":"Red-7 Inche","weight_unit":"kg","inventory_quantity":1000,"sku":"WE1937375-\u7ea2\u8584\u6b3e7\u516c\u5236","barcode":"","position":1,"option1":"Red","option2":"7 Inche","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d248d7fb825096337a21cd7824011125.jpeg","path":"d248d7fb825096337a21cd7824011125.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":22.97,"min_quantity":1}],"weight":"0","compare_at_price":"36.99","price":"22.97","retail_price":"36.99","available":true,"url":"\/products\/for-carpenter-tri-square-line-scriber-saw-guide98ba7c17-2a40-49b7-8bd0-dcb80849b23f?variant=1f8cc095-9b57-416d-9400-8c5c01ff4fdc","available_quantity":999999999,"options":[{"name":"Color","value":"Red"},{"name":"Size","value":"7 Inche"}],"off_ratio":38,"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.