Discounts - Hats
${function() {
const variantData = data.variant || {"id":"89ee48a8-0c66-48d8-99b1-6ef56ae74e00","product_id":"cdb3ba39-ab99-45fb-acda-038fbdbbb572","title":"black","weight_unit":"kg","inventory_quantity":1,"sku":"","barcode":"","position":1,"option1":"black","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/92e6167b8704ca1c5aad01524db1169a.jpg","path":"92e6167b8704ca1c5aad01524db1169a.jpg","width":1279,"height":1706,"alt":"","aspect_ratio":0.7497069167643611},"wholesale_price":[{"price":8,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"8","retail_price":"0","available":true,"url":"\/products\/discounts-hats-udpf?variant=89ee48a8-0c66-48d8-99b1-6ef56ae74e00","available_quantity":999999999,"options":[{"name":"colour","value":"black"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `-`
}
`;
}()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"89ee48a8-0c66-48d8-99b1-6ef56ae74e00","product_id":"cdb3ba39-ab99-45fb-acda-038fbdbbb572","title":"black","weight_unit":"kg","inventory_quantity":1,"sku":"","barcode":"","position":1,"option1":"black","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/92e6167b8704ca1c5aad01524db1169a.jpg","path":"92e6167b8704ca1c5aad01524db1169a.jpg","width":1279,"height":1706,"alt":"","aspect_ratio":0.7497069167643611},"wholesale_price":[{"price":8,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"8","retail_price":"0","available":true,"url":"\/products\/discounts-hats-udpf?variant=89ee48a8-0c66-48d8-99b1-6ef56ae74e00","available_quantity":999999999,"options":[{"name":"colour","value":"black"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
${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 `
`;
}()}