${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 `
`;
}()}
${function() {
const variantData = data.variant || {"id":"af9cb0bb-a28a-4ffe-bd19-c9b93f3bd522","product_id":"b3b0ab3b-2d27-4b7f-87f2-253bfe8738b6","title":"Caf\u00e9-M","weight_unit":"lb","inventory_quantity":500,"sku":"FR-20220105-FCY-H01+","barcode":"","position":1,"option1":"Caf\u00e9","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/63d71efb1197d8f9cfd5e98c931b6cde.jpeg","path":"63d71efb1197d8f9cfd5e98c931b6cde.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":26.85,"min_quantity":1}],"weight":"0","compare_at_price":"41.36","price":"26.85","retail_price":"41.36","available":true,"url":"\/products\/casquette-octogonale-casquette-de-canard-pour-homme?variant=af9cb0bb-a28a-4ffe-bd19-c9b93f3bd522","available_quantity":999999999,"options":[{"name":"Couleur","value":"Caf\u00e9"},{"name":"Taille","value":"M"}],"off_ratio":35,"flashsale_info":[],"sales":2};
const saveType = "amount";
const saveText = "Enregistrer {{saved_amount}}";
return `
-
${saveText.replace('\{\{saved_amount\}\}',
saveType == 'percentage'
? variantData.off_ratio + '%'
: ` `
)}
`;
}()}
Détail €41.36
2 vendu
people are viewing this right now
Couleur
: Café
${function(){
const optName = "Couleur";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (': ' + optionValue) : '';
return `
${optionValueText}
`
}()}
${function(){
const tipText = "Veuillez s\u00e9lectionner un {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Taille
: M
${function(){
const optName = "Taille";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (': ' + optionValue) : '';
return `
${optionValueText}
`
}()}
${function(){
const tipText = "Veuillez s\u00e9lectionner un {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Ajouter au panier
€26.85
${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":"af9cb0bb-a28a-4ffe-bd19-c9b93f3bd522","product_id":"b3b0ab3b-2d27-4b7f-87f2-253bfe8738b6","title":"Caf\u00e9-M","weight_unit":"lb","inventory_quantity":500,"sku":"FR-20220105-FCY-H01+","barcode":"","position":1,"option1":"Caf\u00e9","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/63d71efb1197d8f9cfd5e98c931b6cde.jpeg","path":"63d71efb1197d8f9cfd5e98c931b6cde.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":26.85,"min_quantity":1}],"weight":"0","compare_at_price":"41.36","price":"26.85","retail_price":"41.36","available":true,"url":"\/products\/casquette-octogonale-casquette-de-canard-pour-homme?variant=af9cb0bb-a28a-4ffe-bd19-c9b93f3bd522","available_quantity":999999999,"options":[{"name":"Couleur","value":"Caf\u00e9"},{"name":"Taille","value":"M"}],"off_ratio":35,"flashsale_info":[],"sales":2};
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 {
return `
`
}
}()}
Acheter maintenant
Le produit était en rupture de stock.
Le produit n'est pas disponible.
${function(){
const variantData = data.variant || {"id":"af9cb0bb-a28a-4ffe-bd19-c9b93f3bd522","product_id":"b3b0ab3b-2d27-4b7f-87f2-253bfe8738b6","title":"Caf\u00e9-M","weight_unit":"lb","inventory_quantity":500,"sku":"FR-20220105-FCY-H01+","barcode":"","position":1,"option1":"Caf\u00e9","option2":"M","option3":"","note":"","image":{"src":"\/\/img.staticdj.com\/63d71efb1197d8f9cfd5e98c931b6cde.jpeg","path":"63d71efb1197d8f9cfd5e98c931b6cde.jpeg","width":800,"height":800,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":26.85,"min_quantity":1}],"weight":"0","compare_at_price":"41.36","price":"26.85","retail_price":"41.36","available":true,"url":"\/products\/casquette-octogonale-casquette-de-canard-pour-homme?variant=af9cb0bb-a28a-4ffe-bd19-c9b93f3bd522","available_quantity":999999999,"options":[{"name":"Couleur","value":"Caf\u00e9"},{"name":"Taille","value":"M"}],"off_ratio":35,"flashsale_info":[],"sales":2};
return `
Poids : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
code à barre : ${variantData && variantData.barcode}
`
}()}