${function() {
const variantData = data.variant || {"id":"6d0bfeac-d39a-45dd-8b96-74516768e9da","product_id":"0946767f-32d7-4ec3-99ae-c0a3ce73163d","title":"Blue-XS","weight_unit":"kg","inventory_quantity":1000,"sku":"a-\u5f00\u8869\u6e10\u53d8\u624e\u67d3\u957f\u88d9-Blue-XS-1","barcode":"","position":1,"option1":"Blue","option2":"XS","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/7d673b19adf1cdb0c9900fbfaef62da3.jpeg","path":"7d673b19adf1cdb0c9900fbfaef62da3.jpeg","width":600,"height":800,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":35.87,"min_quantity":1}],"weight":"0","compare_at_price":"67.98","price":"35.87","retail_price":"67.98","available":true,"url":"\/products\/slit-gradient-dressad2aa1a6-1252-4831-b5a7-fb44724e6a78?variant=6d0bfeac-d39a-45dd-8b96-74516768e9da","available_quantity":999999999,"options":[{"name":"color","value":"Blue"},{"name":"size","value":"XS"}],"off_ratio":47,"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
: 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}
`
}()}
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}
`
}()}
Add to cart
$35.87
${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":"6d0bfeac-d39a-45dd-8b96-74516768e9da","product_id":"0946767f-32d7-4ec3-99ae-c0a3ce73163d","title":"Blue-XS","weight_unit":"kg","inventory_quantity":1000,"sku":"a-\u5f00\u8869\u6e10\u53d8\u624e\u67d3\u957f\u88d9-Blue-XS-1","barcode":"","position":1,"option1":"Blue","option2":"XS","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/7d673b19adf1cdb0c9900fbfaef62da3.jpeg","path":"7d673b19adf1cdb0c9900fbfaef62da3.jpeg","width":600,"height":800,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":35.87,"min_quantity":1}],"weight":"0","compare_at_price":"67.98","price":"35.87","retail_price":"67.98","available":true,"url":"\/products\/slit-gradient-dressad2aa1a6-1252-4831-b5a7-fb44724e6a78?variant=6d0bfeac-d39a-45dd-8b96-74516768e9da","available_quantity":999999999,"options":[{"name":"color","value":"Blue"},{"name":"size","value":"XS"}],"off_ratio":47,"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.