${function() {
const variantData = data.variant || {"id":"95c1d1cd-019b-4a22-a1c8-0e770d7147e0","product_id":"1b186047-1ab7-4300-9593-5bcd63bd1f23","title":"BUY 1","weight_unit":"kg","inventory_quantity":0,"sku":"SLR6JMG6-0002","barcode":"","position":1,"option1":"BUY 1","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\/handheld-highly-sensitive-metal-detectors-jm45?variant=95c1d1cd-019b-4a22-a1c8-0e770d7147e0","available_quantity":999999999,"options":[{"name":"Packages","value":"BUY 1"}],"off_ratio":33,"flashsale_info":[],"sales":2515};
const saveType = "percentage";
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('20');
const maxInventory = parseInt('100');
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 `
`;
}()}
people are viewing this right now
Product was out of stock.
Product is unavailable.