【 TOPPP】 M224128# PXG New Men's Knitted Stripe Contrast Knitted Top
${function() {
const variantData = data.variant || {"id":"e5f8fa62-7520-4d42-b896-6338c802de35","product_id":"74126704-bd04-4095-ac03-aaeb465202d3","title":"Khaki-M","weight_unit":"kg","inventory_quantity":40,"sku":"M224128180}-Khaki-M-A0014468","barcode":"","position":4,"option1":"Khaki","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/a50ba8b095af3e628fe65d6f843be37c.jpg","path":"a50ba8b095af3e628fe65d6f843be37c.jpg","width":1440,"height":1800,"alt":"","aspect_ratio":0.8},"wholesale_price":[{"price":41,"min_quantity":1}],"weight":"0","compare_at_price":"95","price":"41","retail_price":"95","available":true,"url":"\/products\/toppp-m224128-pxg-new-mens-knitted-stripe-contrast-knitted-top?variant=e5f8fa62-7520-4d42-b896-6338c802de35","available_quantity":40,"options":[{"name":"Color","value":"Khaki"},{"name":"Size","value":"M"}],"off_ratio":57,"flashsale_info":[],"sales":21};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Color:
Khaki
${function(){
const optName = "Color";
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
$41.00
${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":"e5f8fa62-7520-4d42-b896-6338c802de35","product_id":"74126704-bd04-4095-ac03-aaeb465202d3","title":"Khaki-M","weight_unit":"kg","inventory_quantity":40,"sku":"M224128180}-Khaki-M-A0014468","barcode":"","position":4,"option1":"Khaki","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/a50ba8b095af3e628fe65d6f843be37c.jpg","path":"a50ba8b095af3e628fe65d6f843be37c.jpg","width":1440,"height":1800,"alt":"","aspect_ratio":0.8},"wholesale_price":[{"price":41,"min_quantity":1}],"weight":"0","compare_at_price":"95","price":"41","retail_price":"95","available":true,"url":"\/products\/toppp-m224128-pxg-new-mens-knitted-stripe-contrast-knitted-top?variant=e5f8fa62-7520-4d42-b896-6338c802de35","available_quantity":40,"options":[{"name":"Color","value":"Khaki"},{"name":"Size","value":"M"}],"off_ratio":57,"flashsale_info":[],"sales":21};
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":"e5f8fa62-7520-4d42-b896-6338c802de35","product_id":"74126704-bd04-4095-ac03-aaeb465202d3","title":"Khaki-M","weight_unit":"kg","inventory_quantity":40,"sku":"M224128180}-Khaki-M-A0014468","barcode":"","position":4,"option1":"Khaki","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/a50ba8b095af3e628fe65d6f843be37c.jpg","path":"a50ba8b095af3e628fe65d6f843be37c.jpg","width":1440,"height":1800,"alt":"","aspect_ratio":0.8},"wholesale_price":[{"price":41,"min_quantity":1}],"weight":"0","compare_at_price":"95","price":"41","retail_price":"95","available":true,"url":"\/products\/toppp-m224128-pxg-new-mens-knitted-stripe-contrast-knitted-top?variant=e5f8fa62-7520-4d42-b896-6338c802de35","available_quantity":40,"options":[{"name":"Color","value":"Khaki"},{"name":"Size","value":"M"}],"off_ratio":57,"flashsale_info":[],"sales":21};
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 `
`;
}()}