👀Any 5 Items $70👀
👀Any 5 Items $70👀
${data.title}
${function() {
const defaultSelectedVariant = data.variants.find(v => v.available) || data.variants[0];
return `
-
`;
}()}
${function() {
const defaultSelectedVariant = data.variants.find(v => v.available) || data.variants[0];
let status_lan = "ADD TO CART";
if ((defaultSelectedVariant && !defaultSelectedVariant.available) || (!defaultSelectedVariant && !data.available)) {
status_lan = "Sold out";
}
return `
Confirm
See item details
`;
}()}
Select Prescription :
${function() {
return data.product.options.map((option, index) => {
const optionName = option.name || '';
const values = option.values || [];
const thumbType = 'text';
return `
${data.selectedValues[optionName]}
${values.map(value => {
const disabled = data.name == optionName && data.disabledValues.includes(value) ? 'disabled' : '';
let selected = '';
if (disabled != 'disabled' && data.selectedValues[optionName] == value) {
selected = 'selected';
}
return `
${value}
`;
}).join('')}
`;
}).join('');
}()}
${data.targetOption || data.defaultValue || ''}
${function() {
const options = data?.product?.options || [];
const optLen = options.length;
const selectedValues = Object.values(data?.selectedValues || {}) || [];
const available = data?.variant?.available || true;
const suffixId = Math.floor(Math.random() * 1000000);
return `
${options.map((opt,index)=>{
return `
${opt.values.map((val)=>{
const selected = data.selectedValues[opt.name][0] === val ? 'selected' : '';
return `
${val}
`
}).join("")}
${selectedValues[index][0]}
`
}).join("")}
`;
}()}
${
(data.variant && data.variant.available)
? "ADD TO CART"
: "Sold out"
}
${data.targetOption}
${data.line_items.map(item => {
const variantNames = item.options.map(option => option.value).join(' / ');
return `
`;
}).join('')}
Your cart is currently empty.
You may also like
${(function() {
try {
var products = (data.products || []).filter(p => p.has_only_default_variant);
var counts = products.length;
if (counts === 0) return ` `;
return `
${products.map(item => {
var img = item.image || {};
var variant = item.variants && item.variants[0] || {};
var variant_title = variant.title;
var variant_price = variant.price;
var varant_id = variant.id;
return `
`
}).join('')}
`
} catch(err) {
return '';
}
})()
}
${Array(data.total || []).fill().map((val, idx) => idx).map((val, idx) => `
`).join('')}