New unisex sun protection and sun shading duckbill hat
${function() {
const variantData = data.variant || {"id":"7a15e082-4cf0-4adb-b9fe-c48efde4c1eb","product_id":"5e71b554-bea5-49cb-bb5b-485b0ffa0ee4","title":"\u9ed1\u8272-10pc","weight_unit":"kg","inventory_quantity":50,"sku":"\u5927\u65ed35-\u9ed1\u8272-10pc\u6279\u53d1-A0016421","barcode":"","position":1,"option1":"\u9ed1\u8272","option2":"10pc","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/cb92ae452f77a4976c5e545a1ac5f16f.jpg","path":"cb92ae452f77a4976c5e545a1ac5f16f.jpg","width":1000,"height":1000,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":130,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"130","retail_price":"0","available":true,"url":"\/products\/new-unisex-sun-protection-and-sun-shading-duckbill-hat-bco4?variant=7a15e082-4cf0-4adb-b9fe-c48efde4c1eb","available_quantity":50,"options":[{"name":"\u989c\u8272","value":"\u9ed1\u8272"},{"name":"wholesale","value":"10pc"}],"off_ratio":0,"flashsale_info":[],"sales":8};
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:
10pc
${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
$130.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":"7a15e082-4cf0-4adb-b9fe-c48efde4c1eb","product_id":"5e71b554-bea5-49cb-bb5b-485b0ffa0ee4","title":"\u9ed1\u8272-10pc","weight_unit":"kg","inventory_quantity":50,"sku":"\u5927\u65ed35-\u9ed1\u8272-10pc\u6279\u53d1-A0016421","barcode":"","position":1,"option1":"\u9ed1\u8272","option2":"10pc","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/cb92ae452f77a4976c5e545a1ac5f16f.jpg","path":"cb92ae452f77a4976c5e545a1ac5f16f.jpg","width":1000,"height":1000,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":130,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"130","retail_price":"0","available":true,"url":"\/products\/new-unisex-sun-protection-and-sun-shading-duckbill-hat-bco4?variant=7a15e082-4cf0-4adb-b9fe-c48efde4c1eb","available_quantity":50,"options":[{"name":"\u989c\u8272","value":"\u9ed1\u8272"},{"name":"wholesale","value":"10pc"}],"off_ratio":0,"flashsale_info":[],"sales":8};
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":"7a15e082-4cf0-4adb-b9fe-c48efde4c1eb","product_id":"5e71b554-bea5-49cb-bb5b-485b0ffa0ee4","title":"\u9ed1\u8272-10pc","weight_unit":"kg","inventory_quantity":50,"sku":"\u5927\u65ed35-\u9ed1\u8272-10pc\u6279\u53d1-A0016421","barcode":"","position":1,"option1":"\u9ed1\u8272","option2":"10pc","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/cb92ae452f77a4976c5e545a1ac5f16f.jpg","path":"cb92ae452f77a4976c5e545a1ac5f16f.jpg","width":1000,"height":1000,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":130,"min_quantity":1}],"weight":"0","compare_at_price":"0","price":"130","retail_price":"0","available":true,"url":"\/products\/new-unisex-sun-protection-and-sun-shading-duckbill-hat-bco4?variant=7a15e082-4cf0-4adb-b9fe-c48efde4c1eb","available_quantity":50,"options":[{"name":"\u989c\u8272","value":"\u9ed1\u8272"},{"name":"wholesale","value":"10pc"}],"off_ratio":0,"flashsale_info":[],"sales":8};
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 `
`;
}()}