【 TOPPP】【 Pre sale Expected December 30th】 0864- Men's uniquely designed thick jacket with down splicing hoodie
${function() {
const variantData = data.variant || {"id":"361ad5d4-1d09-459d-9f5e-dbc845b1e81d","product_id":"4c62d223-f036-469b-a3c6-72800456c1f4","title":"Khaki-M","weight_unit":"kg","inventory_quantity":9,"sku":"0864-00390-Khaki-M-A0011279","barcode":"","position":1,"option1":"Khaki","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3437733f39bb002ee4902852f4e0f1ab.jpg","path":"3437733f39bb002ee4902852f4e0f1ab.jpg","width":1040,"height":1560,"alt":"","aspect_ratio":0.6666666666666666},"wholesale_price":[{"price":79,"min_quantity":1}],"weight":"0.5","compare_at_price":"0","price":"79","retail_price":"0","available":true,"url":"\/products\/toppp-pre-sale-expected-december-30th-0864-mens-uniquely-designed-thick-jacket-with-down-splicing-hoodie?variant=361ad5d4-1d09-459d-9f5e-dbc845b1e81d","available_quantity":9,"options":[{"name":"colour","value":"Khaki"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":23};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Colour:
${function(){
const optName = "colour";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (optionValue) : '';
return `${optionValueText} `;
}()}
Khaki
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Size:
${function(){
const optName = "size";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (optionValue) : '';
return `${optionValueText} `;
}()}
M
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Add to cart
${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":"361ad5d4-1d09-459d-9f5e-dbc845b1e81d","product_id":"4c62d223-f036-469b-a3c6-72800456c1f4","title":"Khaki-M","weight_unit":"kg","inventory_quantity":9,"sku":"0864-00390-Khaki-M-A0011279","barcode":"","position":1,"option1":"Khaki","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3437733f39bb002ee4902852f4e0f1ab.jpg","path":"3437733f39bb002ee4902852f4e0f1ab.jpg","width":1040,"height":1560,"alt":"","aspect_ratio":0.6666666666666666},"wholesale_price":[{"price":79,"min_quantity":1}],"weight":"0.5","compare_at_price":"0","price":"79","retail_price":"0","available":true,"url":"\/products\/toppp-pre-sale-expected-december-30th-0864-mens-uniquely-designed-thick-jacket-with-down-splicing-hoodie?variant=361ad5d4-1d09-459d-9f5e-dbc845b1e81d","available_quantity":9,"options":[{"name":"colour","value":"Khaki"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":23};
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":"361ad5d4-1d09-459d-9f5e-dbc845b1e81d","product_id":"4c62d223-f036-469b-a3c6-72800456c1f4","title":"Khaki-M","weight_unit":"kg","inventory_quantity":9,"sku":"0864-00390-Khaki-M-A0011279","barcode":"","position":1,"option1":"Khaki","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3437733f39bb002ee4902852f4e0f1ab.jpg","path":"3437733f39bb002ee4902852f4e0f1ab.jpg","width":1040,"height":1560,"alt":"","aspect_ratio":0.6666666666666666},"wholesale_price":[{"price":79,"min_quantity":1}],"weight":"0.5","compare_at_price":"0","price":"79","retail_price":"0","available":true,"url":"\/products\/toppp-pre-sale-expected-december-30th-0864-mens-uniquely-designed-thick-jacket-with-down-splicing-hoodie?variant=361ad5d4-1d09-459d-9f5e-dbc845b1e81d","available_quantity":9,"options":[{"name":"colour","value":"Khaki"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":23};
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 `
`;
}()}
Only 40 item(s) left in stock!