Dog that poops (Design)
${function() {
const variantData = data.variant || {"id":"0d7c7715-516b-4fb8-9854-9c69333fb044","product_id":"4a7a7319-8263-44fb-8da8-c09254134c37","title":"","weight_unit":"kg","inventory_quantity":1000,"sku":"A1636","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":51.2,"min_quantity":1}],"weight":"0","compare_at_price":"51.2","price":"51.2","retail_price":"51.2","available":true,"url":"\/products\/dog-that-poops-design?variant=0d7c7715-516b-4fb8-9854-9c69333fb044","available_quantity":999999999,"options":[],"off_ratio":0,"flashsale_info":[],"sales":3};
const saveType = "amount";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `-`
}
`;
}()}
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"0d7c7715-516b-4fb8-9854-9c69333fb044","product_id":"4a7a7319-8263-44fb-8da8-c09254134c37","title":"","weight_unit":"kg","inventory_quantity":1000,"sku":"A1636","barcode":"","position":1,"option1":"","option2":"","option3":"","note":"","image":null,"wholesale_price":[{"price":51.2,"min_quantity":1}],"weight":"0","compare_at_price":"51.2","price":"51.2","retail_price":"51.2","available":true,"url":"\/products\/dog-that-poops-design?variant=0d7c7715-516b-4fb8-9854-9c69333fb044","available_quantity":999999999,"options":[],"off_ratio":0,"flashsale_info":[],"sales":3};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
${function() {
const postageFreeAmount = 20;
const custom_text = "Buy {amount} more to enjoy FREE Shipping";
const totalPrice = +data.total_price;
const diffPrice = postageFreeAmount - totalPrice;
const percentDiff = (diffPrice > 0 ? (totalPrice / postageFreeAmount * 100) : 100) + '%';
let tipText = "Your order is free delivery";
if (diffPrice > 0) {
tipText = custom_text.replace('{amount}', `
`);
}
return `
`;
}()}