Cat Door Knocker
${function() {
const variantData = data.variant || {"id":"4e6c7de4-2517-4530-9af1-0bfc1889c9e6","product_id":"93521075-88c7-4e70-b0c5-ebbb14021600","title":"style A-buy 1","weight_unit":"lb","inventory_quantity":979,"sku":"x-\u00e8\u00c3\u017b\u00b7-1","barcode":"","position":1,"option1":"style A","option2":"buy 1","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/46e554a0982c2b718434574567ec9cad.jpeg","path":"46e554a0982c2b718434574567ec9cad.jpeg","width":794,"height":1058,"alt":"","aspect_ratio":0.7504725897920604},"wholesale_price":[{"price":29.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"29.99","retail_price":"0","available":true,"url":"\/products\/cat-door-knocker35d76f82-a294-4cc9-a333-354d8e5b07cf?variant=4e6c7de4-2517-4530-9af1-0bfc1889c9e6","available_quantity":999999999,"options":[{"name":"STYLE","value":"style A"},{"name":"Do you need to buy multiple decorations for your home?","value":"buy 1"}],"off_ratio":0,"flashsale_info":[],"sales":2};
const saveType = "amount";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `- `
}
`;
}()}
Style:
style A
${function(){
const optName = "STYLE";
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}
`
}()}
Do You Need To Buy Multiple Decorations For Your Home?:
buy 1
${function(){
const optName = "Do you need to buy multiple decorations for your home?";
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
$29.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":"4e6c7de4-2517-4530-9af1-0bfc1889c9e6","product_id":"93521075-88c7-4e70-b0c5-ebbb14021600","title":"style A-buy 1","weight_unit":"lb","inventory_quantity":979,"sku":"x-\u00e8\u00c3\u017b\u00b7-1","barcode":"","position":1,"option1":"style A","option2":"buy 1","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/46e554a0982c2b718434574567ec9cad.jpeg","path":"46e554a0982c2b718434574567ec9cad.jpeg","width":794,"height":1058,"alt":"","aspect_ratio":0.7504725897920604},"wholesale_price":[{"price":29.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"29.99","retail_price":"0","available":true,"url":"\/products\/cat-door-knocker35d76f82-a294-4cc9-a333-354d8e5b07cf?variant=4e6c7de4-2517-4530-9af1-0bfc1889c9e6","available_quantity":999999999,"options":[{"name":"STYLE","value":"style A"},{"name":"Do you need to buy multiple decorations for your home?","value":"buy 1"}],"off_ratio":0,"flashsale_info":[],"sales":2};
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":"4e6c7de4-2517-4530-9af1-0bfc1889c9e6","product_id":"93521075-88c7-4e70-b0c5-ebbb14021600","title":"style A-buy 1","weight_unit":"lb","inventory_quantity":979,"sku":"x-\u00e8\u00c3\u017b\u00b7-1","barcode":"","position":1,"option1":"style A","option2":"buy 1","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/46e554a0982c2b718434574567ec9cad.jpeg","path":"46e554a0982c2b718434574567ec9cad.jpeg","width":794,"height":1058,"alt":"","aspect_ratio":0.7504725897920604},"wholesale_price":[{"price":29.99,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"29.99","retail_price":"0","available":true,"url":"\/products\/cat-door-knocker35d76f82-a294-4cc9-a333-354d8e5b07cf?variant=4e6c7de4-2517-4530-9af1-0bfc1889c9e6","available_quantity":999999999,"options":[{"name":"STYLE","value":"style A"},{"name":"Do you need to buy multiple decorations for your home?","value":"buy 1"}],"off_ratio":0,"flashsale_info":[],"sales":2};
return `
Sku : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
`
}()}