${function() {
const variantData = data.variant || {"id":"c7102f2d-c011-447f-ac8f-29e94d0cc394","product_id":"2c325b4f-890c-4ada-b5fc-98213905ea56","title":"Green-S","weight_unit":"kg","inventory_quantity":999,"sku":"PH1-220516-01-Green-S","barcode":"","position":1,"option1":"Green","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3590a5e626132ae9c3cf57c69e5a0515.jpeg","path":"3590a5e626132ae9c3cf57c69e5a0515.jpeg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":25.8,"min_quantity":1}],"weight":"0.25","compare_at_price":"35.99","price":"25.8","retail_price":"35.99","available":true,"url":"\/products\/2020-men-gothic-retro-t-shirt-lace-up-v-neck-denim-pocket-short-sleeve-tee-shirt-loose-tops?variant=c7102f2d-c011-447f-ac8f-29e94d0cc394","available_quantity":999,"options":[{"name":"color","value":"Green"},{"name":"size","value":"S"}],"off_ratio":28,"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
: Green
${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
: S
${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
$25.80
${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":"c7102f2d-c011-447f-ac8f-29e94d0cc394","product_id":"2c325b4f-890c-4ada-b5fc-98213905ea56","title":"Green-S","weight_unit":"kg","inventory_quantity":999,"sku":"PH1-220516-01-Green-S","barcode":"","position":1,"option1":"Green","option2":"S","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/3590a5e626132ae9c3cf57c69e5a0515.jpeg","path":"3590a5e626132ae9c3cf57c69e5a0515.jpeg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":25.8,"min_quantity":1}],"weight":"0.25","compare_at_price":"35.99","price":"25.8","retail_price":"35.99","available":true,"url":"\/products\/2020-men-gothic-retro-t-shirt-lace-up-v-neck-denim-pocket-short-sleeve-tee-shirt-loose-tops?variant=c7102f2d-c011-447f-ac8f-29e94d0cc394","available_quantity":999,"options":[{"name":"color","value":"Green"},{"name":"size","value":"S"}],"off_ratio":28,"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.