New Women's Golf Contrast Matte Long sleeved Top W123340
${function() {
const variantData = data.variant || {"id":"ff6858b1-e8a3-4888-8a12-3d35e6354e15","product_id":"48a6a0bf-e1fa-4e31-96a6-342b10371c51","title":"XS-BLUE","weight_unit":"kg","inventory_quantity":10,"sku":"W123340170-XS-BLUE-A001100","barcode":"","position":3,"option1":"XS","option2":"BLUE","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9fd09c32a163da1f4c24af3335c54099.jpg","path":"9fd09c32a163da1f4c24af3335c54099.jpg","width":1440,"height":1920,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":40,"min_quantity":1}],"weight":"0","compare_at_price":"40","price":"40","retail_price":"40","available":true,"url":"\/products\/new-womens-golf-contrast-matte-long-sleeved-top-w123340?variant=ff6858b1-e8a3-4888-8a12-3d35e6354e15","available_quantity":10,"options":[{"name":"SIZE","value":"XS"},{"name":"COLOR","value":"BLUE"}],"off_ratio":0,"flashsale_info":[],"sales":23};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Size:
XS
${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}
`
}()}
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}
`
}()}
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":"ff6858b1-e8a3-4888-8a12-3d35e6354e15","product_id":"48a6a0bf-e1fa-4e31-96a6-342b10371c51","title":"XS-BLUE","weight_unit":"kg","inventory_quantity":10,"sku":"W123340170-XS-BLUE-A001100","barcode":"","position":3,"option1":"XS","option2":"BLUE","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9fd09c32a163da1f4c24af3335c54099.jpg","path":"9fd09c32a163da1f4c24af3335c54099.jpg","width":1440,"height":1920,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":40,"min_quantity":1}],"weight":"0","compare_at_price":"40","price":"40","retail_price":"40","available":true,"url":"\/products\/new-womens-golf-contrast-matte-long-sleeved-top-w123340?variant=ff6858b1-e8a3-4888-8a12-3d35e6354e15","available_quantity":10,"options":[{"name":"SIZE","value":"XS"},{"name":"COLOR","value":"BLUE"}],"off_ratio":0,"flashsale_info":[],"sales":23};
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":"ff6858b1-e8a3-4888-8a12-3d35e6354e15","product_id":"48a6a0bf-e1fa-4e31-96a6-342b10371c51","title":"XS-BLUE","weight_unit":"kg","inventory_quantity":10,"sku":"W123340170-XS-BLUE-A001100","barcode":"","position":3,"option1":"XS","option2":"BLUE","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/9fd09c32a163da1f4c24af3335c54099.jpg","path":"9fd09c32a163da1f4c24af3335c54099.jpg","width":1440,"height":1920,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":40,"min_quantity":1}],"weight":"0","compare_at_price":"40","price":"40","retail_price":"40","available":true,"url":"\/products\/new-womens-golf-contrast-matte-long-sleeved-top-w123340?variant=ff6858b1-e8a3-4888-8a12-3d35e6354e15","available_quantity":10,"options":[{"name":"SIZE","value":"XS"},{"name":"COLOR","value":"BLUE"}],"off_ratio":0,"flashsale_info":[],"sales":23};
return `
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
${function() {
const minInventory = parseInt('10');
const maxInventory = parseInt('50');
const randomInventory = Math.round(Math.random() * (maxInventory - minInventory)) + minInventory;
const customText = "Only {stock} item(s) left in stock!".replace(/\{stock\}/g, '' + randomInventory + ' ');
const barWidth = (randomInventory / maxInventory) * 100 + '%';
return `
`;
}()}