Rose Tree Lamp
${function() {
const variantData = data.variant || {"id":"b9d8356d-4460-4956-9352-b6de77664dbe","product_id":"5a7d73c0-f2f3-47e8-a3d3-f5ecb9835e27","title":"Black-Pink","weight_unit":"kg","inventory_quantity":996,"sku":"x-\u73ab\u7470\u6811\u706f-\u7c89\u8272-1","barcode":"","position":1,"option1":"Black","option2":"Pink","option3":"","note":"","image":null,"wholesale_price":[{"price":55.99,"min_quantity":1}],"weight":"0","compare_at_price":"99.99","price":"55.99","retail_price":"99.99","available":true,"url":"\/products\/rose-tree-lamp?variant=b9d8356d-4460-4956-9352-b6de77664dbe","available_quantity":996,"options":[{"name":"Tree Color","value":"Black"},{"name":"Rose Color","value":"Pink"}],"off_ratio":44,"flashsale_info":[],"sales":2};
const saveType = "amount";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `- `
}
`;
}()}
Tree Color:
Black
${function(){
const optName = "Tree 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}
`
}()}
Rose Color:
Pink
${function(){
const optName = "Rose 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
$55.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":"b9d8356d-4460-4956-9352-b6de77664dbe","product_id":"5a7d73c0-f2f3-47e8-a3d3-f5ecb9835e27","title":"Black-Pink","weight_unit":"kg","inventory_quantity":996,"sku":"x-\u73ab\u7470\u6811\u706f-\u7c89\u8272-1","barcode":"","position":1,"option1":"Black","option2":"Pink","option3":"","note":"","image":null,"wholesale_price":[{"price":55.99,"min_quantity":1}],"weight":"0","compare_at_price":"99.99","price":"55.99","retail_price":"99.99","available":true,"url":"\/products\/rose-tree-lamp?variant=b9d8356d-4460-4956-9352-b6de77664dbe","available_quantity":996,"options":[{"name":"Tree Color","value":"Black"},{"name":"Rose Color","value":"Pink"}],"off_ratio":44,"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.
${function(){
const variantData = data.variant || {"id":"b9d8356d-4460-4956-9352-b6de77664dbe","product_id":"5a7d73c0-f2f3-47e8-a3d3-f5ecb9835e27","title":"Black-Pink","weight_unit":"kg","inventory_quantity":996,"sku":"x-\u73ab\u7470\u6811\u706f-\u7c89\u8272-1","barcode":"","position":1,"option1":"Black","option2":"Pink","option3":"","note":"","image":null,"wholesale_price":[{"price":55.99,"min_quantity":1}],"weight":"0","compare_at_price":"99.99","price":"55.99","retail_price":"99.99","available":true,"url":"\/products\/rose-tree-lamp?variant=b9d8356d-4460-4956-9352-b6de77664dbe","available_quantity":996,"options":[{"name":"Tree Color","value":"Black"},{"name":"Rose Color","value":"Pink"}],"off_ratio":44,"flashsale_info":[],"sales":2};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}