【 TOPPP 】【Pre sale, shipped on November25th 】R536- Men's clothing, model style, autumn and winter new knitted sweater jacket
${function() {
const variantData = data.variant || {"id":"abd42482-f4f0-476e-bc3a-ee041e58a6ab","product_id":"b5e3f01f-501e-466d-b574-86e09aea9c4c","title":"gray-M","weight_unit":"kg","inventory_quantity":10,"sku":"R536-230-gray-M-A00114226","barcode":"","position":1,"option1":"gray","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b797d536e1c81fa712c31d38374ed346.jpg","path":"b797d536e1c81fa712c31d38374ed346.jpg","width":1664,"height":2048,"alt":"","aspect_ratio":0.8125},"wholesale_price":[{"price":53.8,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"53.8","retail_price":"0","available":true,"url":"\/products\/toppp-pre-sale-shipped-on-november25th-r536-mens-clothing-model-style-autumn-and-winter-new-knitted-sweater-jacket?variant=abd42482-f4f0-476e-bc3a-ee041e58a6ab","available_quantity":10,"options":[{"name":"colour","value":"gray"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":6};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Colour:
gray
${function(){
const optName = "colour";
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}
`
}()}
Size:
M
${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}
`
}()}
Add to cart
$53.80
${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":"abd42482-f4f0-476e-bc3a-ee041e58a6ab","product_id":"b5e3f01f-501e-466d-b574-86e09aea9c4c","title":"gray-M","weight_unit":"kg","inventory_quantity":10,"sku":"R536-230-gray-M-A00114226","barcode":"","position":1,"option1":"gray","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b797d536e1c81fa712c31d38374ed346.jpg","path":"b797d536e1c81fa712c31d38374ed346.jpg","width":1664,"height":2048,"alt":"","aspect_ratio":0.8125},"wholesale_price":[{"price":53.8,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"53.8","retail_price":"0","available":true,"url":"\/products\/toppp-pre-sale-shipped-on-november25th-r536-mens-clothing-model-style-autumn-and-winter-new-knitted-sweater-jacket?variant=abd42482-f4f0-476e-bc3a-ee041e58a6ab","available_quantity":10,"options":[{"name":"colour","value":"gray"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":6};
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":"abd42482-f4f0-476e-bc3a-ee041e58a6ab","product_id":"b5e3f01f-501e-466d-b574-86e09aea9c4c","title":"gray-M","weight_unit":"kg","inventory_quantity":10,"sku":"R536-230-gray-M-A00114226","barcode":"","position":1,"option1":"gray","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/b797d536e1c81fa712c31d38374ed346.jpg","path":"b797d536e1c81fa712c31d38374ed346.jpg","width":1664,"height":2048,"alt":"","aspect_ratio":0.8125},"wholesale_price":[{"price":53.8,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"53.8","retail_price":"0","available":true,"url":"\/products\/toppp-pre-sale-shipped-on-november25th-r536-mens-clothing-model-style-autumn-and-winter-new-knitted-sweater-jacket?variant=abd42482-f4f0-476e-bc3a-ee041e58a6ab","available_quantity":10,"options":[{"name":"colour","value":"gray"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":6};
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 `
`;
}()}