people are viewing this right now
${function() {
const variantData = data.variant || {"id":"060e6ca1-d8ed-4901-92ac-8508f4f61087","product_id":"bdc5bf9b-d5b6-49ca-ac1f-c1dd4b7161c9","title":"Buy 1 pcs","weight_unit":"kg","inventory_quantity":999,"sku":"","barcode":"","position":1,"option1":"Buy 1 pcs","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":39.99,"min_quantity":1}],"weight":"0","compare_at_price":"59.99","price":"39.99","retail_price":"59.99","available":true,"url":"\/products\/electric-christmas-tree-train-set-attaches?variant=060e6ca1-d8ed-4901-92ac-8508f4f61087","available_quantity":999999999,"options":[{"name":"Buy more save more","value":"Buy 1 pcs"}],"off_ratio":33,"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 + '%'
: ``
)}
`;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
${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 `
`;
}()}
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"060e6ca1-d8ed-4901-92ac-8508f4f61087","product_id":"bdc5bf9b-d5b6-49ca-ac1f-c1dd4b7161c9","title":"Buy 1 pcs","weight_unit":"kg","inventory_quantity":999,"sku":"","barcode":"","position":1,"option1":"Buy 1 pcs","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":39.99,"min_quantity":1}],"weight":"0","compare_at_price":"59.99","price":"39.99","retail_price":"59.99","available":true,"url":"\/products\/electric-christmas-tree-train-set-attaches?variant=060e6ca1-d8ed-4901-92ac-8508f4f61087","available_quantity":999999999,"options":[{"name":"Buy more save more","value":"Buy 1 pcs"}],"off_ratio":33,"flashsale_info":[],"sales":1};
return `
`
}()}