Walnut iPhone Case
${function() {
const variantData = data.variant || {"id":"97247fb9-bb97-46a4-aff3-7d1823f9490e","product_id":"5d6f2239-1491-4141-97a3-d3e0e639d3c6","title":"Magnetic-Walnut-iPhone14ProMax","weight_unit":"kg","inventory_quantity":0,"sku":"2ZYL230720-Magnetic-i14PM-RED","barcode":"","position":1,"option1":"Magnetic","option2":"Walnut","option3":"iPhone14ProMax","note":"","image":{"src":"\/\/img.staticdj.com\/2ce1029999c67efee30a10f0b1d6d289.jpg","path":"2ce1029999c67efee30a10f0b1d6d289.jpg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0","compare_at_price":"39.99","price":"19.99","retail_price":"39.99","available":true,"url":"\/products\/walnut?variant=97247fb9-bb97-46a4-aff3-7d1823f9490e","available_quantity":999999999,"options":[{"name":"type","value":"Magnetic"},{"name":"color","value":"Walnut"},{"name":"model","value":"iPhone14ProMax"}],"off_ratio":50,"flashsale_info":[],"sales":0};
const saveType = "percentage";
const productLabelDiscountOn = true;
return `
-
${saveType == 'percentage'
? `-${variantData.off_ratio}% `
: `- `
}
`;
}()}
Type:
Magnetic
${function(){
const optName = "type";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (optionValue) : '';
return `${optionValueText} `;
}()}
${function(){
const tipText = "Por favor seleccione un {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Color:
Walnut
${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 = "Por favor seleccione un {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Model:
iPhone14ProMax
${function(){
const optName = "model";
const optionValue = data.originData.selectData ? data.originData.selectData[optName].value : data.originData.value;
const optionValueText = optionValue ? (optionValue) : '';
return `${optionValueText} `;
}()}
${function(){
const tipText = "Por favor seleccione un {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Añadir a la cesta
$19.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":"97247fb9-bb97-46a4-aff3-7d1823f9490e","product_id":"5d6f2239-1491-4141-97a3-d3e0e639d3c6","title":"Magnetic-Walnut-iPhone14ProMax","weight_unit":"kg","inventory_quantity":0,"sku":"2ZYL230720-Magnetic-i14PM-RED","barcode":"","position":1,"option1":"Magnetic","option2":"Walnut","option3":"iPhone14ProMax","note":"","image":{"src":"\/\/img.staticdj.com\/2ce1029999c67efee30a10f0b1d6d289.jpg","path":"2ce1029999c67efee30a10f0b1d6d289.jpg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0","compare_at_price":"39.99","price":"19.99","retail_price":"39.99","available":true,"url":"\/products\/walnut?variant=97247fb9-bb97-46a4-aff3-7d1823f9490e","available_quantity":999999999,"options":[{"name":"type","value":"Magnetic"},{"name":"color","value":"Walnut"},{"name":"model","value":"iPhone14ProMax"}],"off_ratio":50,"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 ? `
` : ' ';
}
}()}
Compra ahora
El producto estaba agotado.
El producto no está disponible.
${function(){
const variantData = data.variant || {"id":"97247fb9-bb97-46a4-aff3-7d1823f9490e","product_id":"5d6f2239-1491-4141-97a3-d3e0e639d3c6","title":"Magnetic-Walnut-iPhone14ProMax","weight_unit":"kg","inventory_quantity":0,"sku":"2ZYL230720-Magnetic-i14PM-RED","barcode":"","position":1,"option1":"Magnetic","option2":"Walnut","option3":"iPhone14ProMax","note":"","image":{"src":"\/\/img.staticdj.com\/2ce1029999c67efee30a10f0b1d6d289.jpg","path":"2ce1029999c67efee30a10f0b1d6d289.jpg","width":600,"height":600,"alt":"","aspect_ratio":1},"wholesale_price":[{"price":19.99,"min_quantity":1}],"weight":"0","compare_at_price":"39.99","price":"19.99","retail_price":"39.99","available":true,"url":"\/products\/walnut?variant=97247fb9-bb97-46a4-aff3-7d1823f9490e","available_quantity":999999999,"options":[{"name":"type","value":"Magnetic"},{"name":"color","value":"Walnut"},{"name":"model","value":"iPhone14ProMax"}],"off_ratio":50,"flashsale_info":[],"sales":0};
return `
Peso : ${variantData && variantData.weight}${variantData && variantData.weight_unit}
Código de barras : ${variantData && variantData.barcode}
`
}()}