${function() {
const variantData = data.variant || {"id":"40e05223-0130-451c-814e-90e99b5513ee","product_id":"12fa2134-77a4-4d07-a166-2d9179711042","title":"gunmetal-S(US 6-8)","weight_unit":"kg","inventory_quantity":1000,"sku":"MR1502-gunmetal-S(US 6-8)","barcode":"","position":1,"option1":"gunmetal","option2":"S(US 6-8)","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9c1b55cd4c47947ae699e86cb49aff48.jpeg","path":"9c1b55cd4c47947ae699e86cb49aff48.jpeg","width":1350,"height":1800,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":40,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"40","retail_price":"0","available":true,"url":"\/products\/esdri\u2122casual-suede-fashionable-lapel-shirt600fbef8-0621-4ef7-8c73-1d46bd7bd150?variant=40e05223-0130-451c-814e-90e99b5513ee","available_quantity":999999999,"options":[{"name":"color","value":"gunmetal"},{"name":"size","value":"S(US 6-8)"}],"off_ratio":0,"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
: gunmetal
${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(US 6-8)
${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
$40.00
${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":"40e05223-0130-451c-814e-90e99b5513ee","product_id":"12fa2134-77a4-4d07-a166-2d9179711042","title":"gunmetal-S(US 6-8)","weight_unit":"kg","inventory_quantity":1000,"sku":"MR1502-gunmetal-S(US 6-8)","barcode":"","position":1,"option1":"gunmetal","option2":"S(US 6-8)","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9c1b55cd4c47947ae699e86cb49aff48.jpeg","path":"9c1b55cd4c47947ae699e86cb49aff48.jpeg","width":1350,"height":1800,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":40,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"40","retail_price":"0","available":true,"url":"\/products\/esdri\u2122casual-suede-fashionable-lapel-shirt600fbef8-0621-4ef7-8c73-1d46bd7bd150?variant=40e05223-0130-451c-814e-90e99b5513ee","available_quantity":999999999,"options":[{"name":"color","value":"gunmetal"},{"name":"size","value":"S(US 6-8)"}],"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":"40e05223-0130-451c-814e-90e99b5513ee","product_id":"12fa2134-77a4-4d07-a166-2d9179711042","title":"gunmetal-S(US 6-8)","weight_unit":"kg","inventory_quantity":1000,"sku":"MR1502-gunmetal-S(US 6-8)","barcode":"","position":1,"option1":"gunmetal","option2":"S(US 6-8)","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9c1b55cd4c47947ae699e86cb49aff48.jpeg","path":"9c1b55cd4c47947ae699e86cb49aff48.jpeg","width":1350,"height":1800,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":40,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"40","retail_price":"0","available":true,"url":"\/products\/esdri\u2122casual-suede-fashionable-lapel-shirt600fbef8-0621-4ef7-8c73-1d46bd7bd150?variant=40e05223-0130-451c-814e-90e99b5513ee","available_quantity":999999999,"options":[{"name":"color","value":"gunmetal"},{"name":"size","value":"S(US 6-8)"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
people are viewing this right now