${function() {
const variantData = data.variant || {"id":"1b427f70-99d8-44de-a515-585e95c2ea67","product_id":"b308afc8-a941-44b6-8664-64ac0040b66e","title":"Gold-S","weight_unit":"kg","inventory_quantity":1000,"sku":"a-V-Gold-S-1","barcode":"","position":1,"option1":"Gold","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5234edefc5667407420be01947d70357.gif","path":"5234edefc5667407420be01947d70357.gif","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":35.9,"min_quantity":1}],"weight":"0","compare_at_price":"78.98","price":"35.9","retail_price":"78.98","available":true,"url":"\/products\/v-neck-slip-dressbf12d65e-9d00-4358-8e86-306971c4d259?variant=1b427f70-99d8-44de-a515-585e95c2ea67","available_quantity":999999999,"options":[{"name":"Color","value":"Gold"},{"name":"Size","value":"S"}],"off_ratio":55,"flashsale_info":[],"sales":1};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Color
: Gold
${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
${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.90
${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":"1b427f70-99d8-44de-a515-585e95c2ea67","product_id":"b308afc8-a941-44b6-8664-64ac0040b66e","title":"Gold-S","weight_unit":"kg","inventory_quantity":1000,"sku":"a-V-Gold-S-1","barcode":"","position":1,"option1":"Gold","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/5234edefc5667407420be01947d70357.gif","path":"5234edefc5667407420be01947d70357.gif","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":35.9,"min_quantity":1}],"weight":"0","compare_at_price":"78.98","price":"35.9","retail_price":"78.98","available":true,"url":"\/products\/v-neck-slip-dressbf12d65e-9d00-4358-8e86-306971c4d259?variant=1b427f70-99d8-44de-a515-585e95c2ea67","available_quantity":999999999,"options":[{"name":"Color","value":"Gold"},{"name":"Size","value":"S"}],"off_ratio":55,"flashsale_info":[],"sales":1};
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.