${function(){
const variantData = data.variant || {"id":"84e73daa-3599-4e1d-b5b2-f1c0db6342aa","product_id":"cc0e5ec6-4e87-4ff3-8b4e-98a7c66cb288","title":"","weight_unit":"g","inventory_quantity":984,"sku":"535815.04","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":3.99,"min_quantity":1}],"weight":"0","compare_at_price":"5.64","price":"3.99","retail_price":"5.64","available":true,"url":"\/products\/stackable-diamond-painting-rhinestone-bead-sorting-tray-6pcs-mixed-colors535815-04?variant=84e73daa-3599-4e1d-b5b2-f1c0db6342aa","available_quantity":999999999,"options":[],"off_ratio":29,"flashsale_info":[],"sales":3};
return `
Sku : ${variantData && variantData.sku}
`
}()}
${function() {
const variantData = data.variant || {"id":"84e73daa-3599-4e1d-b5b2-f1c0db6342aa","product_id":"cc0e5ec6-4e87-4ff3-8b4e-98a7c66cb288","title":"","weight_unit":"g","inventory_quantity":984,"sku":"535815.04","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":3.99,"min_quantity":1}],"weight":"0","compare_at_price":"5.64","price":"3.99","retail_price":"5.64","available":true,"url":"\/products\/stackable-diamond-painting-rhinestone-bead-sorting-tray-6pcs-mixed-colors535815-04?variant=84e73daa-3599-4e1d-b5b2-f1c0db6342aa","available_quantity":999999999,"options":[],"off_ratio":29,"flashsale_info":[],"sales":3};
const saveType = "percentage";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
${function() {
const minInventory = parseInt('1');
const maxInventory = parseInt('15');
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
€3.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":"84e73daa-3599-4e1d-b5b2-f1c0db6342aa","product_id":"cc0e5ec6-4e87-4ff3-8b4e-98a7c66cb288","title":"","weight_unit":"g","inventory_quantity":984,"sku":"535815.04","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":3.99,"min_quantity":1}],"weight":"0","compare_at_price":"5.64","price":"3.99","retail_price":"5.64","available":true,"url":"\/products\/stackable-diamond-painting-rhinestone-bead-sorting-tray-6pcs-mixed-colors535815-04?variant=84e73daa-3599-4e1d-b5b2-f1c0db6342aa","available_quantity":999999999,"options":[],"off_ratio":29,"flashsale_info":[],"sales":3};
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.
people are viewing this right now