【 TOPPP】M624176- New men's printed elastic band basic pants
${function() {
const variantData = data.variant || {"id":"18f46992-d524-4c8e-8042-1a62c9943d05","product_id":"9464a08e-d1ee-40b3-8fb8-ce5a66c9e899","title":"black-M","weight_unit":"kg","inventory_quantity":27,"sku":"M624176220-black-M-A0017528","barcode":"","position":1,"option1":"black","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e61dce1ad3e87ac59a54b46795dd829d.jpg","path":"e61dce1ad3e87ac59a54b46795dd829d.jpg","width":1440,"height":1920,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":50,"min_quantity":1}],"weight":"0.4","compare_at_price":"0","price":"50","retail_price":"0","available":true,"url":"\/products\/toppp-m624176-new-mens-printed-elastic-band-basic-pants?variant=18f46992-d524-4c8e-8042-1a62c9943d05","available_quantity":27,"options":[{"name":"colour","value":"black"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":8};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Colour:
black
${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
$50.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":"18f46992-d524-4c8e-8042-1a62c9943d05","product_id":"9464a08e-d1ee-40b3-8fb8-ce5a66c9e899","title":"black-M","weight_unit":"kg","inventory_quantity":27,"sku":"M624176220-black-M-A0017528","barcode":"","position":1,"option1":"black","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e61dce1ad3e87ac59a54b46795dd829d.jpg","path":"e61dce1ad3e87ac59a54b46795dd829d.jpg","width":1440,"height":1920,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":50,"min_quantity":1}],"weight":"0.4","compare_at_price":"0","price":"50","retail_price":"0","available":true,"url":"\/products\/toppp-m624176-new-mens-printed-elastic-band-basic-pants?variant=18f46992-d524-4c8e-8042-1a62c9943d05","available_quantity":27,"options":[{"name":"colour","value":"black"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":8};
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":"18f46992-d524-4c8e-8042-1a62c9943d05","product_id":"9464a08e-d1ee-40b3-8fb8-ce5a66c9e899","title":"black-M","weight_unit":"kg","inventory_quantity":27,"sku":"M624176220-black-M-A0017528","barcode":"","position":1,"option1":"black","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e61dce1ad3e87ac59a54b46795dd829d.jpg","path":"e61dce1ad3e87ac59a54b46795dd829d.jpg","width":1440,"height":1920,"alt":"","aspect_ratio":0.75},"wholesale_price":[{"price":50,"min_quantity":1}],"weight":"0.4","compare_at_price":"0","price":"50","retail_price":"0","available":true,"url":"\/products\/toppp-m624176-new-mens-printed-elastic-band-basic-pants?variant=18f46992-d524-4c8e-8042-1a62c9943d05","available_quantity":27,"options":[{"name":"colour","value":"black"},{"name":"size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":8};
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 `
`;
}()}