${function() {
const variantData = data.variant || {"id":"95fdf46b-06fa-4ae0-8015-7a71a073cf83","product_id":"5656cee4-b221-4f0a-9f87-3b2f370bc0ad","title":"As shown-M","weight_unit":"g","inventory_quantity":999,"sku":"22b8afae-56b7-4df6-9861-311ceb43f44a","barcode":"","position":2,"option1":"As shown","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/663af39a9a77214df4bf411b7fd375ab.jpeg","path":"663af39a9a77214df4bf411b7fd375ab.jpeg","width":800,"height":800,"alt":"0b26f64ff9fd599a9992a7a62e8fcdb9","aspect_ratio":1},"wholesale_price":[{"price":23.47,"min_quantity":1}],"weight":"200","compare_at_price":"0","price":"23.47","retail_price":"0","available":true,"url":"\/products\/90s-retro-rare-simple-design-mens-baseball-polo-shirt?variant=95fdf46b-06fa-4ae0-8015-7a71a073cf83","available_quantity":999999999,"options":[{"name":"Color","value":"As shown"},{"name":"Size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const saveText = "Save {{saved_amount}}";
const productLabelDiscountOn = true;
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Free Shipping Order over $89
Color
: As shown
${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
: 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
$23.47
${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":"95fdf46b-06fa-4ae0-8015-7a71a073cf83","product_id":"5656cee4-b221-4f0a-9f87-3b2f370bc0ad","title":"As shown-M","weight_unit":"g","inventory_quantity":999,"sku":"22b8afae-56b7-4df6-9861-311ceb43f44a","barcode":"","position":2,"option1":"As shown","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/663af39a9a77214df4bf411b7fd375ab.jpeg","path":"663af39a9a77214df4bf411b7fd375ab.jpeg","width":800,"height":800,"alt":"0b26f64ff9fd599a9992a7a62e8fcdb9","aspect_ratio":1},"wholesale_price":[{"price":23.47,"min_quantity":1}],"weight":"200","compare_at_price":"0","price":"23.47","retail_price":"0","available":true,"url":"\/products\/90s-retro-rare-simple-design-mens-baseball-polo-shirt?variant=95fdf46b-06fa-4ae0-8015-7a71a073cf83","available_quantity":999999999,"options":[{"name":"Color","value":"As shown"},{"name":"Size","value":"M"}],"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":"95fdf46b-06fa-4ae0-8015-7a71a073cf83","product_id":"5656cee4-b221-4f0a-9f87-3b2f370bc0ad","title":"As shown-M","weight_unit":"g","inventory_quantity":999,"sku":"22b8afae-56b7-4df6-9861-311ceb43f44a","barcode":"","position":2,"option1":"As shown","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/663af39a9a77214df4bf411b7fd375ab.jpeg","path":"663af39a9a77214df4bf411b7fd375ab.jpeg","width":800,"height":800,"alt":"0b26f64ff9fd599a9992a7a62e8fcdb9","aspect_ratio":1},"wholesale_price":[{"price":23.47,"min_quantity":1}],"weight":"200","compare_at_price":"0","price":"23.47","retail_price":"0","available":true,"url":"\/products\/90s-retro-rare-simple-design-mens-baseball-polo-shirt?variant=95fdf46b-06fa-4ae0-8015-7a71a073cf83","available_quantity":999999999,"options":[{"name":"Color","value":"As shown"},{"name":"Size","value":"M"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
`
}()}