${function() {
const variantData = data.variant || {"id":"7d85edb8-50c8-4d3c-a16d-084285f95483","product_id":"000491ad-8452-4184-ad84-5180a88616cc","title":"Leopard Print-L","weight_unit":"g","inventory_quantity":100,"sku":"CJYJ182037803CX","barcode":"","position":1,"option1":"Leopard Print","option2":"L","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/944a86c9db4ce77837531b5afd6e753e.jpeg","path":"944a86c9db4ce77837531b5afd6e753e.jpeg","width":1340,"height":1785,"alt":"","aspect_ratio":0.7507002801120448},"wholesale_price":[{"price":33,"min_quantity":1}],"weight":"137","compare_at_price":"0","price":"33","retail_price":"0","available":true,"url":"\/products\/bikini-womens-european-and-american-swimsuit?variant=7d85edb8-50c8-4d3c-a16d-084285f95483","available_quantity":100,"options":[{"name":"Color","value":"Leopard Print"},{"name":"size","value":"L"}],"off_ratio":0,"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 + '%'
: ` `
)}
`;
}()}
Color
: Leopard Print
${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
: L
${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
$33.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":"7d85edb8-50c8-4d3c-a16d-084285f95483","product_id":"000491ad-8452-4184-ad84-5180a88616cc","title":"Leopard Print-L","weight_unit":"g","inventory_quantity":100,"sku":"CJYJ182037803CX","barcode":"","position":1,"option1":"Leopard Print","option2":"L","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/944a86c9db4ce77837531b5afd6e753e.jpeg","path":"944a86c9db4ce77837531b5afd6e753e.jpeg","width":1340,"height":1785,"alt":"","aspect_ratio":0.7507002801120448},"wholesale_price":[{"price":33,"min_quantity":1}],"weight":"137","compare_at_price":"0","price":"33","retail_price":"0","available":true,"url":"\/products\/bikini-womens-european-and-american-swimsuit?variant=7d85edb8-50c8-4d3c-a16d-084285f95483","available_quantity":100,"options":[{"name":"Color","value":"Leopard Print"},{"name":"size","value":"L"}],"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 {
return `
`
}
}()}
Buy now
Product was out of stock.
Product is unavailable.
${function(){
const variantData = data.variant || {"id":"7d85edb8-50c8-4d3c-a16d-084285f95483","product_id":"000491ad-8452-4184-ad84-5180a88616cc","title":"Leopard Print-L","weight_unit":"g","inventory_quantity":100,"sku":"CJYJ182037803CX","barcode":"","position":1,"option1":"Leopard Print","option2":"L","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/944a86c9db4ce77837531b5afd6e753e.jpeg","path":"944a86c9db4ce77837531b5afd6e753e.jpeg","width":1340,"height":1785,"alt":"","aspect_ratio":0.7507002801120448},"wholesale_price":[{"price":33,"min_quantity":1}],"weight":"137","compare_at_price":"0","price":"33","retail_price":"0","available":true,"url":"\/products\/bikini-womens-european-and-american-swimsuit?variant=7d85edb8-50c8-4d3c-a16d-084285f95483","available_quantity":100,"options":[{"name":"Color","value":"Leopard Print"},{"name":"size","value":"L"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
`
}()}