${function() {
const variantData = data.variant || {"id":"9d3ad82f-3534-4797-8bca-31e842ed475c","product_id":"645180f3-a5cf-496d-9b94-e4aea4e4bf18","title":"PINK-BUY 1 only $19","weight_unit":"kg","inventory_quantity":0,"sku":"SLRE1G9Q-0001","barcode":"","position":1,"option1":"PINK","option2":"BUY 1 only $19","option3":"","note":"","image":null,"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0","compare_at_price":"29","price":"19.99","retail_price":"29","available":true,"url":"\/products\/kitchen-bathroom-storage-hooks?variant=9d3ad82f-3534-4797-8bca-31e842ed475c","available_quantity":999999999,"options":[{"name":"color","value":"PINK"},{"name":"qty","value":"BUY 1 only $19"}],"off_ratio":31,"flashsale_info":[],"sales":51254};
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 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.