T5-New Women's Sun Protection and Sunshade Open Top Hat
${function() {
const variantData = data.variant || {"id":"889c244e-2810-4806-8007-c165fe523765","product_id":"fbddab3b-2d4f-4487-bdae-7d588a67ace5","title":"\u767d\u8272-1PC","weight_unit":"kg","inventory_quantity":2,"sku":"\u5927\u65ed-35-\u767d\u8272-1PC-A0013070","barcode":"","position":3,"option1":"\u767d\u8272","option2":"1PC","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/364e8d74b41c26c25c48743126048ca4.jpg","path":"364e8d74b41c26c25c48743126048ca4.jpg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":20,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"20","retail_price":"0","available":true,"url":"\/products\/t5-new-womens-sun-protection-and-sunshade-open-top-hat?variant=889c244e-2810-4806-8007-c165fe523765","available_quantity":2,"options":[{"name":"\u989c\u8272","value":"\u767d\u8272"},{"name":"wholesale","value":"1PC"}],"off_ratio":0,"flashsale_info":[],"sales":26};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
颜色:
白色
${function(){
const optName = "颜色";
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}
`
}()}
Wholesale:
1PC
${function(){
const optName = "wholesale";
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
$20.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":"889c244e-2810-4806-8007-c165fe523765","product_id":"fbddab3b-2d4f-4487-bdae-7d588a67ace5","title":"\u767d\u8272-1PC","weight_unit":"kg","inventory_quantity":2,"sku":"\u5927\u65ed-35-\u767d\u8272-1PC-A0013070","barcode":"","position":3,"option1":"\u767d\u8272","option2":"1PC","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/364e8d74b41c26c25c48743126048ca4.jpg","path":"364e8d74b41c26c25c48743126048ca4.jpg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":20,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"20","retail_price":"0","available":true,"url":"\/products\/t5-new-womens-sun-protection-and-sunshade-open-top-hat?variant=889c244e-2810-4806-8007-c165fe523765","available_quantity":2,"options":[{"name":"\u989c\u8272","value":"\u767d\u8272"},{"name":"wholesale","value":"1PC"}],"off_ratio":0,"flashsale_info":[],"sales":26};
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":"889c244e-2810-4806-8007-c165fe523765","product_id":"fbddab3b-2d4f-4487-bdae-7d588a67ace5","title":"\u767d\u8272-1PC","weight_unit":"kg","inventory_quantity":2,"sku":"\u5927\u65ed-35-\u767d\u8272-1PC-A0013070","barcode":"","position":3,"option1":"\u767d\u8272","option2":"1PC","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/364e8d74b41c26c25c48743126048ca4.jpg","path":"364e8d74b41c26c25c48743126048ca4.jpg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":20,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"20","retail_price":"0","available":true,"url":"\/products\/t5-new-womens-sun-protection-and-sunshade-open-top-hat?variant=889c244e-2810-4806-8007-c165fe523765","available_quantity":2,"options":[{"name":"\u989c\u8272","value":"\u767d\u8272"},{"name":"wholesale","value":"1PC"}],"off_ratio":0,"flashsale_info":[],"sales":26};
return `
Weight : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Barcode : ${variantData && variantData.barcode}
`
}()}
${function() {
const minInventory = parseInt('10');
const maxInventory = parseInt('50');
const randomInventory = Math.round(Math.random() * (maxInventory - minInventory)) + minInventory;
const customText = "Only {stock} item(s) left in stock!".replace(/\{stock\}/g, '' + randomInventory + ' ');
const barWidth = (randomInventory / maxInventory) * 100 + '%';
return `
`;
}()}