${function() {
const variantData = data.variant || {"id":"d7c7f020-3d6a-4f6c-a9d6-d61e08294887","product_id":"06bd7c30-ade5-461b-a2ee-2dbd7658faef","title":"1","weight_unit":"kg","inventory_quantity":1000,"sku":"-vecna mask 1-A0026151","barcode":"","position":1,"option1":"1","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/dd5f17b8eea02bd032958d51b3491ff3.jpeg","path":"dd5f17b8eea02bd032958d51b3491ff3.jpeg","width":1600,"height":1600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":29.99,"min_quantity":1}],"weight":"0","compare_at_price":"74.99","price":"29.99","retail_price":"74.99","available":true,"url":"\/products\/vecna-stranger-things-mask-horror-mask-party-cosplay-costume-latex-propsb74bcfe9-bf5e-4e22-8a02-9776d557e32fc55fbac2-078a-455d-a08f-4d6aa985e091?variant=d7c7f020-3d6a-4f6c-a9d6-d61e08294887","available_quantity":999999999,"options":[{"name":"Style","value":"1"}],"off_ratio":60,"flashsale_info":[],"sales":0};
const saveType = "amount";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Style
: 1
${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}
`
}()}
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":"d7c7f020-3d6a-4f6c-a9d6-d61e08294887","product_id":"06bd7c30-ade5-461b-a2ee-2dbd7658faef","title":"1","weight_unit":"kg","inventory_quantity":1000,"sku":"-vecna mask 1-A0026151","barcode":"","position":1,"option1":"1","option2":"","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/dd5f17b8eea02bd032958d51b3491ff3.jpeg","path":"dd5f17b8eea02bd032958d51b3491ff3.jpeg","width":1600,"height":1600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":29.99,"min_quantity":1}],"weight":"0","compare_at_price":"74.99","price":"29.99","retail_price":"74.99","available":true,"url":"\/products\/vecna-stranger-things-mask-horror-mask-party-cosplay-costume-latex-propsb74bcfe9-bf5e-4e22-8a02-9776d557e32fc55fbac2-078a-455d-a08f-4d6aa985e091?variant=d7c7f020-3d6a-4f6c-a9d6-d61e08294887","available_quantity":999999999,"options":[{"name":"Style","value":"1"}],"off_ratio":60,"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.