Preço
${function() {
const selectedVariant = data.variants.find(v => v.available) || data.variants[0];
return !!selectedVariant ? `
Salvar
` : `
-
`;
}()}
${function() {
const selectedVariant = data.variants.find(v => v.available) || data.variants[0];
const statusLan = (
(selectedVariant && !selectedVariant.available) ||
(!selectedVariant && !data.available)) ?
"Vendido" :
"Adicionar ao Carrinho";
const status = (
(selectedVariant && !selectedVariant.available) ||
(!selectedVariant && !data.available)) ? 'soldout' : 'available';
return `
O produto está indisponível.
Produto estava esgotado.
`;
}()}
${function() {
const MAX_INVENTORY = 999999;
const product0 = Object.prototype.toString.call(data) == '[object Array]' ? data[0] : data;
const inventoryQty = product0.inventory_quantity;
const inventoryPolicy = product0.inventory_policy;
const inventoryTracking = product0.inventory_tracking;
const exactInventoryStatusId = "quick-shop-exact-inventory-render";
const lowStock = 5;
const selectedVariant = product0.variants.find(v => v.available) || data.variants[0];
const selectedVariantAvailableQuantity = selectedVariant && selectedVariant.available_quantity;
let actualInventory = inventoryQty;
if ((inventoryTracking && inventoryPolicy == 'continue') || !inventoryTracking) {
actualInventory = MAX_INVENTORY;
}
return `
Avaliabilidade:
Fora de estoque
em estoque, pronto para ser enviado
Baixo estoque
`;
}()}