people are viewing this right now
${function() {
const variantData = data.variant || {"id":"283dde41-0670-41ec-8cbc-793e762dd9c3","product_id":"28e62a2b-50bd-401d-bc6c-dfd6df8602b9","title":"Black(6 Compartments)","weight_unit":"kg","inventory_quantity":1000,"sku":"18053389268598024786842726","barcode":"","position":1,"option1":"Black(6 Compartments)","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":14.99,"min_quantity":1}],"weight":"0","compare_at_price":"37.48","price":"14.99","retail_price":"37.48","available":true,"url":"\/products\/organizer-storage-box?variant=283dde41-0670-41ec-8cbc-793e762dd9c3","available_quantity":999999999,"options":[{"name":"Size","value":"Black(6 Compartments)"}],"off_ratio":60,"flashsale_info":[],"sales":0};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Size
: Black(6 Compartments)
${function(){
const optName = "Size";
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}
`
}()}
${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 `
`;
}()}
Add to cart
$14.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":"283dde41-0670-41ec-8cbc-793e762dd9c3","product_id":"28e62a2b-50bd-401d-bc6c-dfd6df8602b9","title":"Black(6 Compartments)","weight_unit":"kg","inventory_quantity":1000,"sku":"18053389268598024786842726","barcode":"","position":1,"option1":"Black(6 Compartments)","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":14.99,"min_quantity":1}],"weight":"0","compare_at_price":"37.48","price":"14.99","retail_price":"37.48","available":true,"url":"\/products\/organizer-storage-box?variant=283dde41-0670-41ec-8cbc-793e762dd9c3","available_quantity":999999999,"options":[{"name":"Size","value":"Black(6 Compartments)"}],"off_ratio":60,"flashsale_info":[],"sales":0};
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":"283dde41-0670-41ec-8cbc-793e762dd9c3","product_id":"28e62a2b-50bd-401d-bc6c-dfd6df8602b9","title":"Black(6 Compartments)","weight_unit":"kg","inventory_quantity":1000,"sku":"18053389268598024786842726","barcode":"","position":1,"option1":"Black(6 Compartments)","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":14.99,"min_quantity":1}],"weight":"0","compare_at_price":"37.48","price":"14.99","retail_price":"37.48","available":true,"url":"\/products\/organizer-storage-box?variant=283dde41-0670-41ec-8cbc-793e762dd9c3","available_quantity":999999999,"options":[{"name":"Size","value":"Black(6 Compartments)"}],"off_ratio":60,"flashsale_info":[],"sales":0};
return `
`
}()}