${function() {
const variantData = data.variant || {"id":"434d7c42-5c15-462e-85ed-32cad504dc90","product_id":"67a28576-da89-43aa-920e-8df84ea10119","title":"XS-Multicolor","weight_unit":"kg","inventory_quantity":1000,"sku":"gbSMDF240530-8nH-XS","barcode":"gbSMDF240530-8nH","position":1,"option1":"XS","option2":"Multicolor","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/094162f9283dd3d3ba09b20f87e3289b.jpg","path":"094162f9283dd3d3ba09b20f87e3289b.jpg","width":750,"height":1000,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":31.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"31.99","retail_price":"0","available":true,"url":"\/products\/gbsmdf240530-8nh-25dg-f5gw2a3411a6-5497-49e3-98a0-f0c98ad2f181?variant=434d7c42-5c15-462e-85ed-32cad504dc90","available_quantity":999999999,"options":[{"name":"Size","value":"XS"},{"name":"Color","value":"Multicolor"}],"off_ratio":0,"flashsale_info":[],"sales":2};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
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
: Multicolor
${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
$31.99
${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":"434d7c42-5c15-462e-85ed-32cad504dc90","product_id":"67a28576-da89-43aa-920e-8df84ea10119","title":"XS-Multicolor","weight_unit":"kg","inventory_quantity":1000,"sku":"gbSMDF240530-8nH-XS","barcode":"gbSMDF240530-8nH","position":1,"option1":"XS","option2":"Multicolor","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/094162f9283dd3d3ba09b20f87e3289b.jpg","path":"094162f9283dd3d3ba09b20f87e3289b.jpg","width":750,"height":1000,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":31.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"31.99","retail_price":"0","available":true,"url":"\/products\/gbsmdf240530-8nh-25dg-f5gw2a3411a6-5497-49e3-98a0-f0c98ad2f181?variant=434d7c42-5c15-462e-85ed-32cad504dc90","available_quantity":999999999,"options":[{"name":"Size","value":"XS"},{"name":"Color","value":"Multicolor"}],"off_ratio":0,"flashsale_info":[],"sales":2};
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.