Boss Lady Hooded Warm Shawl Cape
${function() {
const variantData = data.variant || {"id":"8fa15eb8-4f6e-4bc1-9ebc-84c892e4e9fe","product_id":"e6c18890-8324-4c3b-86a7-f0533dfa9400","title":"White-one-size","weight_unit":"kg","inventory_quantity":1000,"sku":"443050ypmysy-White-one-size","barcode":"","position":1,"option1":"White","option2":"one-size","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e882f7e0461622c5c19c49fc9373165c.jpeg","path":"e882f7e0461622c5c19c49fc9373165c.jpeg","width":1140,"height":1424,"alt":"","aspect_ratio":0.800561797752809},"wholesale_price":[{"price":35.99,"min_quantity":1}],"weight":"0.4","compare_at_price":"35.99","price":"35.99","retail_price":"35.99","available":true,"url":"\/products\/boss-lady-hooded-warm-shawl-cape?variant=8fa15eb8-4f6e-4bc1-9ebc-84c892e4e9fe","available_quantity":999999999,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"one-size"}],"off_ratio":0,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const productLabelDiscountOn = false;
const map = {
B: ` `,
C: ` `,
A: `
${saveType == 'percentage'
? `-${variantData.off_ratio}%`
: `- `
}
`
}
const price_group_arr = ["B","C","A"];
const price_str_arr = price_group_arr.map(type => map[type]);
return `
-
${price_str_arr.join('')}
`;
}()}
SKU : 443050ypmysy-White-one-size
Weight : 0.4kg
${function(){
const variantData = data.variant || {"id":"8fa15eb8-4f6e-4bc1-9ebc-84c892e4e9fe","product_id":"e6c18890-8324-4c3b-86a7-f0533dfa9400","title":"White-one-size","weight_unit":"kg","inventory_quantity":1000,"sku":"443050ypmysy-White-one-size","barcode":"","position":1,"option1":"White","option2":"one-size","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e882f7e0461622c5c19c49fc9373165c.jpeg","path":"e882f7e0461622c5c19c49fc9373165c.jpeg","width":1140,"height":1424,"alt":"","aspect_ratio":0.800561797752809},"wholesale_price":[{"price":35.99,"min_quantity":1}],"weight":"0.4","compare_at_price":"35.99","price":"35.99","retail_price":"35.99","available":true,"url":"\/products\/boss-lady-hooded-warm-shawl-cape?variant=8fa15eb8-4f6e-4bc1-9ebc-84c892e4e9fe","available_quantity":999999999,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"one-size"}],"off_ratio":0,"flashsale_info":[],"sales":0};
return `
SKU : ${variantData && variantData.sku}
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
Color:
White
${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:
one-size
${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
$35.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":"8fa15eb8-4f6e-4bc1-9ebc-84c892e4e9fe","product_id":"e6c18890-8324-4c3b-86a7-f0533dfa9400","title":"White-one-size","weight_unit":"kg","inventory_quantity":1000,"sku":"443050ypmysy-White-one-size","barcode":"","position":1,"option1":"White","option2":"one-size","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/e882f7e0461622c5c19c49fc9373165c.jpeg","path":"e882f7e0461622c5c19c49fc9373165c.jpeg","width":1140,"height":1424,"alt":"","aspect_ratio":0.800561797752809},"wholesale_price":[{"price":35.99,"min_quantity":1}],"weight":"0.4","compare_at_price":"35.99","price":"35.99","retail_price":"35.99","available":true,"url":"\/products\/boss-lady-hooded-warm-shawl-cape?variant=8fa15eb8-4f6e-4bc1-9ebc-84c892e4e9fe","available_quantity":999999999,"options":[{"name":"Color","value":"White"},{"name":"Size","value":"one-size"}],"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 does not exist
${function() {
const minDays = parseInt('8');
const maxDays = parseInt('12');
const customText = "Estimated Delivery\uff1a{min_date} - {max_date}, Stock Preparation Period: 1-3 days, Shipping time: 8~12 Days";
const minDate = new Date(Date.now() + (minDays * 86400000));
const maxDate = new Date(Date.now() + (maxDays * 86400000));
const formatDate = (minDate.getFullYear() == maxDate.getFullYear() && minDate.getFullYear() == new Date().getFullYear())
? new Intl.DateTimeFormat('en', { month: 'short', day: '2-digit' })
: new Intl.DateTimeFormat('en', { month: 'short', day: '2-digit', year: 'numeric' });
const tipText = customText.replace(/\{min_date\}/g, '' + formatDate.format(minDate) + ' ')
.replace(/\{max_date\}/g, '' + formatDate.format(maxDate) + ' ');
return `
${tipText}
`;
}()}
${function() {
const postageFreeAmount = 69;
const custom_text = "Buy {amount} more to enjoy FREE Shipping";
const totalPrice = +data.total_price;
const diffPrice = postageFreeAmount - totalPrice;
const percentDiff = (diffPrice > 0 ? (totalPrice / postageFreeAmount * 100) : 100) + '%';
let tipText = "Your order has free shipping";
if (diffPrice > 0) {
tipText = custom_text.replace('{amount}', `
`);
}
return `
`;
}()}