Removable Combination Butterfly Corner Code
${function() {
const variantData = data.variant || {"id":"b8d06fa1-930c-4803-985b-967df3e4bda9","product_id":"33bbb83b-bf51-45d4-b1aa-c0ee9c1d5bd1","title":"silver-10 Pcs","weight_unit":"kg","inventory_quantity":994,"sku":"CP26823-Z11844","barcode":"","position":1,"option1":"silver","option2":"10 Pcs","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d5b6d927b1b660de69b9065b7ae28643.jpeg","path":"d5b6d927b1b660de69b9065b7ae28643.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":24.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"24.99","retail_price":"0","available":true,"url":"\/products\/removable-combination-butterfly-corner-code4f641a7a-a940-4e3b-a09a-db5ca7e896e0?variant=b8d06fa1-930c-4803-985b-967df3e4bda9","available_quantity":999999999,"options":[{"name":"Color","value":"silver"},{"name":"Quantity","value":"10 Pcs"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "amount";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Color:
silver
${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}
`
}()}
Quantity:
10 Pcs
${function(){
const optName = "Quantity";
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
$24.99
${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":"b8d06fa1-930c-4803-985b-967df3e4bda9","product_id":"33bbb83b-bf51-45d4-b1aa-c0ee9c1d5bd1","title":"silver-10 Pcs","weight_unit":"kg","inventory_quantity":994,"sku":"CP26823-Z11844","barcode":"","position":1,"option1":"silver","option2":"10 Pcs","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d5b6d927b1b660de69b9065b7ae28643.jpeg","path":"d5b6d927b1b660de69b9065b7ae28643.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":24.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"24.99","retail_price":"0","available":true,"url":"\/products\/removable-combination-butterfly-corner-code4f641a7a-a940-4e3b-a09a-db5ca7e896e0?variant=b8d06fa1-930c-4803-985b-967df3e4bda9","available_quantity":999999999,"options":[{"name":"Color","value":"silver"},{"name":"Quantity","value":"10 Pcs"}],"off_ratio":0,"flashsale_info":[],"sales":0};
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":"b8d06fa1-930c-4803-985b-967df3e4bda9","product_id":"33bbb83b-bf51-45d4-b1aa-c0ee9c1d5bd1","title":"silver-10 Pcs","weight_unit":"kg","inventory_quantity":994,"sku":"CP26823-Z11844","barcode":"","position":1,"option1":"silver","option2":"10 Pcs","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/d5b6d927b1b660de69b9065b7ae28643.jpeg","path":"d5b6d927b1b660de69b9065b7ae28643.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":24.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"24.99","retail_price":"0","available":true,"url":"\/products\/removable-combination-butterfly-corner-code4f641a7a-a940-4e3b-a09a-db5ca7e896e0?variant=b8d06fa1-930c-4803-985b-967df3e4bda9","available_quantity":999999999,"options":[{"name":"Color","value":"silver"},{"name":"Quantity","value":"10 Pcs"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}