From 57b689e20980e42aed8e13d22b802258ed227764 Mon Sep 17 00:00:00 2001 From: Eugene Kasimov <105315663+eugenekasimov@users.noreply.github.com> Date: Wed, 26 Oct 2022 12:47:41 -0700 Subject: [PATCH] Add Inventory status block (#1979) --- assets/global.js | 7 +++ assets/section-main-product.css | 21 ++++++++ locales/bg-BG.json | 6 +++ locales/cs.json | 8 ++- locales/cs.schema.json | 24 +++++++++ locales/da.json | 6 +++ locales/da.schema.json | 24 +++++++++ locales/de.json | 6 +++ locales/de.schema.json | 24 +++++++++ locales/el.json | 6 +++ locales/en.default.json | 6 +++ locales/en.default.schema.json | 24 +++++++++ locales/es.json | 6 +++ locales/es.schema.json | 24 +++++++++ locales/fi.json | 8 ++- locales/fi.schema.json | 24 +++++++++ locales/fr.json | 8 ++- locales/fr.schema.json | 24 +++++++++ locales/hr-HR.json | 6 +++ locales/hu.json | 6 +++ locales/id.json | 6 +++ locales/it.json | 6 +++ locales/it.schema.json | 24 +++++++++ locales/ja.json | 6 +++ locales/ja.schema.json | 24 +++++++++ locales/ko.json | 6 +++ locales/ko.schema.json | 24 +++++++++ locales/lt-LT.json | 6 +++ locales/nb.json | 6 +++ locales/nb.schema.json | 24 +++++++++ locales/nl.json | 8 ++- locales/nl.schema.json | 24 +++++++++ locales/pl.json | 6 +++ locales/pl.schema.json | 24 +++++++++ locales/pt-BR.json | 6 +++ locales/pt-BR.schema.json | 24 +++++++++ locales/pt-PT.json | 6 +++ locales/pt-PT.schema.json | 24 +++++++++ locales/ro-RO.json | 6 +++ locales/ru.json | 6 +++ locales/sk-SK.json | 6 +++ locales/sl-SI.json | 6 +++ locales/sv.json | 6 +++ locales/sv.schema.json | 24 +++++++++ locales/th.json | 8 ++- locales/th.schema.json | 24 +++++++++ locales/tr.json | 6 +++ locales/tr.schema.json | 24 +++++++++ locales/vi.json | 6 +++ locales/vi.schema.json | 24 +++++++++ locales/zh-CN.json | 6 +++ locales/zh-CN.schema.json | 24 +++++++++ locales/zh-TW.json | 6 +++ locales/zh-TW.schema.json | 24 +++++++++ sections/featured-product.liquid | 2 +- sections/main-product.liquid | 92 +++++++++++++++++++++++++++++++- 56 files changed, 815 insertions(+), 7 deletions(-) diff --git a/assets/global.js b/assets/global.js index dc1a790da6d..064975efa51 100644 --- a/assets/global.js +++ b/assets/global.js @@ -859,8 +859,11 @@ class VariantSelects extends HTMLElement { const skuDestination = document.getElementById(`Sku-${this.dataset.section}`); const variantPickerDestination = document.getElementById(`variant-radios-${this.dataset.section}`) || document.getElementById(`variant-selects-${this.dataset.section}`); const variantPickerSource = html.getElementById(`variant-radios-${this.dataset.originalSection ? this.dataset.originalSection : this.dataset.section}`) || html.getElementById(`variant-selects-${this.dataset.originalSection ? this.dataset.originalSection : this.dataset.section}`); + const inventorySource = html.getElementById(`Inventory-${this.dataset.originalSection ? this.dataset.originalSection : this.dataset.section}`); + const inventoryDestination = document.getElementById(`Inventory-${this.dataset.section}`); if (source && destination) destination.innerHTML = source.innerHTML; + if (inventorySource && inventoryDestination) inventoryDestination.innerHTML = inventorySource.innerHTML; if (variantPickerSource && variantPickerDestination) variantPickerDestination.innerHTML = variantPickerSource.innerHTML; if (skuSource && skuDestination) { skuDestination.innerHTML = skuSource.innerHTML; @@ -871,6 +874,8 @@ class VariantSelects extends HTMLElement { if (price) price.classList.remove('visibility-hidden'); + if (inventoryDestination) inventoryDestination.classList.toggle('visibility-hidden', inventorySource.innerText === ''); + this.toggleAddButton(!this.currentVariant.available, window.variantStrings.soldOut); document.querySelector('variant-radios') ? this.querySelector(`[for="${activeElementId}"]`).focus() : this.querySelector(`#${activeElementId}`).focus(); @@ -900,11 +905,13 @@ class VariantSelects extends HTMLElement { const addButton = button.querySelector('[name="add"]'); const addButtonText = button.querySelector('[name="add"] > span'); const price = document.getElementById(`price-${this.dataset.section}`); + const inventory = document.getElementById(`Inventory-${this.dataset.section}`); const sku = document.getElementById(`Sku-${this.dataset.section}`); if (!addButton) return; addButtonText.textContent = window.variantStrings.unavailable; if (price) price.classList.add('visibility-hidden'); + if (inventory) inventory.classList.add('visibility-hidden'); if (sku) sku.classList.add('visibility-hidden'); } diff --git a/assets/section-main-product.css b/assets/section-main-product.css index e60833d7e38..653fa5385d3 100644 --- a/assets/section-main-product.css +++ b/assets/section-main-product.css @@ -1286,6 +1286,27 @@ a.product__text { flex-shrink: 0; } +/* Inventory status */ + +.product__inventory { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.product--no-media .product__inventory { + justify-content: center; +} + +/* This keeps the container from getting display: none; applied to it and to make sure we're not introducing some layout shift when switching to an unavailable variant */ +.product__inventory.visibility-hidden:empty { + display: block; +} + +.product__inventory.visibility-hidden:empty::after { + content: "#"; +} + /* Icon with text */ .icon-with-text { --icon-size: calc(var(--font-heading-scale) * 3rem); diff --git a/locales/bg-BG.json b/locales/bg-BG.json index b3a94d6f056..01e7dbeff5b 100644 --- a/locales/bg-BG.json +++ b/locales/bg-BG.json @@ -153,6 +153,12 @@ "choose_product_options": "Изберете опции за {{ product_name }}", "value_unavailable": "{{ option_value }} [Неналично]", "variant_sold_out_or_unavailable": "Вариантът е изчерпан или неналичен.", + "inventory_in_stock": "В наличност", + "inventory_in_stock_show_count": "{{ quantity }} в наличност", + "inventory_low_stock": "Ниски наличности", + "inventory_low_stock_show_count": "Ниски наличности: остават {{ quantity }}", + "inventory_out_of_stock": "Изчерпано количество", + "inventory_out_of_stock_continue_selling": "В наличност", "sku": "SKU" }, "modal": { diff --git a/locales/cs.json b/locales/cs.json index 3bc9005216b..0199d25bcc3 100644 --- a/locales/cs.json +++ b/locales/cs.json @@ -155,7 +155,13 @@ "choose_product_options": "Zvolte možnosti pro: {{ product_name }}", "value_unavailable": "{{ option_value }} [nedostupné]", "variant_sold_out_or_unavailable": "Vyprodaná nebo nedostupná varianta", - "sku": "SKU" + "inventory_in_stock": "Skladem", + "inventory_in_stock_show_count": "{{ quantity }} skladem", + "inventory_low_stock": "Skladové zásoby docházejí", + "inventory_low_stock_show_count": "Skladové zásoby docházejí, zbývající množství: {{ quantity }}", + "inventory_out_of_stock": "Není skladem", + "sku": "SKU", + "inventory_out_of_stock_continue_selling": "Skladem" }, "modal": { "label": "Galerie multimédií" diff --git a/locales/cs.schema.json b/locales/cs.schema.json index d1523463f75..022ca8fd781 100644 --- a/locales/cs.schema.json +++ b/locales/cs.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Stav skladových zásob", + "settings": { + "text_style": { + "label": "Textový styl", + "options__1": { + "label": "Hlavní část" + }, + "options__2": { + "label": "Podtitul" + }, + "options__3": { + "label": "Velká písmena" + } + }, + "inventory_threshold": { + "label": "Práh docházejících skladových zásob", + "info": "Zvolte 0, pokud chcete vždy zobrazoval stav Skladem, když je zboží k dispozici." + }, + "show_inventory_quantity": { + "label": "Zobrazovat objem skladových zásob" + } + } } }, "settings": { diff --git a/locales/da.json b/locales/da.json index bdef1529ed1..5b0d1666c7b 100644 --- a/locales/da.json +++ b/locales/da.json @@ -153,6 +153,12 @@ "choose_product_options": "Vælg muligheder for {{ product_name }}", "value_unavailable": "{{ option_value }} [Utilgængelig]", "variant_sold_out_or_unavailable": "Varianten er udsolgt eller utilgængelig", + "inventory_in_stock": "På lager", + "inventory_in_stock_show_count": "{{ quantity }} på lager", + "inventory_low_stock": "Lav lagerbeholdning", + "inventory_low_stock_show_count": "Lav lagerbeholdning: {{ quantity }} tilbage", + "inventory_out_of_stock": "Ikke på lager", + "inventory_out_of_stock_continue_selling": "På lager", "sku": "SKU" }, "modal": { diff --git a/locales/da.schema.json b/locales/da.schema.json index edb855e62e1..ee0b020c191 100644 --- a/locales/da.schema.json +++ b/locales/da.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Lagerstatus", + "settings": { + "text_style": { + "label": "Teksttypografi", + "options__1": { + "label": "Brødtekst" + }, + "options__2": { + "label": "Underoverskrift" + }, + "options__3": { + "label": "Store bogstaver" + } + }, + "inventory_threshold": { + "label": "Lav grænse for lagerbeholdning", + "info": "Vælg 0 for altid at vise på lager, hvis tilgængelig." + }, + "show_inventory_quantity": { + "label": "Vis lagerantal" + } + } } }, "settings": { diff --git a/locales/de.json b/locales/de.json index a4a15eeb26a..672d95597d5 100644 --- a/locales/de.json +++ b/locales/de.json @@ -153,6 +153,12 @@ "choose_product_options": "Optionen für {{ product_name }} auswählen", "value_unavailable": "{{ option_value }} [Nicht verfügbar]", "variant_sold_out_or_unavailable": "Variante ausverkauft oder nicht verfügbar", + "inventory_in_stock": "Auf Lager", + "inventory_in_stock_show_count": "{{ quantity }} auf Lager", + "inventory_low_stock": "Niedriger Lagerbestand", + "inventory_low_stock_show_count": "Niedriger Lagerbestand: {{ quantity }} verbleibend", + "inventory_out_of_stock": "Nicht vorrätig", + "inventory_out_of_stock_continue_selling": "Auf Lager", "sku": "SKU" }, "modal": { diff --git a/locales/de.schema.json b/locales/de.schema.json index b98dcb60608..56c4900341e 100644 --- a/locales/de.schema.json +++ b/locales/de.schema.json @@ -1829,6 +1829,30 @@ } } } + }, + "inventory": { + "name": "Inventarstatus", + "settings": { + "text_style": { + "label": "Textstil", + "options__1": { + "label": "Nachricht" + }, + "options__2": { + "label": "Untertitel" + }, + "options__3": { + "label": "Großbuchstaben" + } + }, + "inventory_threshold": { + "label": "Geringer Inventarschwellenwert", + "info": "Wähle 0 aus, um immer den Lagerbestand anzuzeigen, falls verfügbar." + }, + "show_inventory_quantity": { + "label": "Inventar anzeigen" + } + } } }, "settings": { diff --git a/locales/el.json b/locales/el.json index fd4be896cb5..41164609d99 100644 --- a/locales/el.json +++ b/locales/el.json @@ -153,6 +153,12 @@ "choose_product_options": "Ορίστε επιλογές για {{ product_name }}", "value_unavailable": "{{ option_value }} [Μη διαθέσιμο]", "variant_sold_out_or_unavailable": "Η παραλλαγή εξαντλήθηκε ή δεν είναι διαθέσιμη", + "inventory_in_stock": "Σε απόθεμα", + "inventory_in_stock_show_count": "{{ quantity }} σε απόθεμα", + "inventory_low_stock": "Χαμηλό απόθεμα", + "inventory_low_stock_show_count": "Χαμηλό απόθεμα: Απομένουν {{ quantity }}", + "inventory_out_of_stock": "Χωρίς απόθεμα", + "inventory_out_of_stock_continue_selling": "Σε απόθεμα", "sku": "SKU" }, "modal": { diff --git a/locales/en.default.json b/locales/en.default.json index 6a52a83a9df..2bf611c6071 100644 --- a/locales/en.default.json +++ b/locales/en.default.json @@ -108,6 +108,12 @@ "choose_options": "Choose options", "choose_product_options": "Choose options for {{ product_name }}", "description": "Description", + "inventory_in_stock": "In stock", + "inventory_in_stock_show_count": "{{ quantity }} in stock", + "inventory_low_stock": "Low stock", + "inventory_low_stock_show_count": "Low stock: {{ quantity }} left", + "inventory_out_of_stock": "Out of stock", + "inventory_out_of_stock_continue_selling": "In stock", "sku": "SKU", "on_sale": "Sale", "product_variants": "Product variants", diff --git a/locales/en.default.schema.json b/locales/en.default.schema.json index c288d5a5643..f0e416b83ad 100644 --- a/locales/en.default.schema.json +++ b/locales/en.default.schema.json @@ -1662,6 +1662,30 @@ "price": { "name": "Price" }, + "inventory": { + "name": "Inventory status", + "settings": { + "text_style": { + "label": "Text style", + "options__1": { + "label": "Body" + }, + "options__2": { + "label": "Subtitle" + }, + "options__3": { + "label": "Uppercase" + } + }, + "inventory_threshold": { + "label": "Low inventory threshold", + "info": "Choose 0 to always show in stock if available." + }, + "show_inventory_quantity": { + "label": "Show inventory count" + } + } + }, "quantity_selector": { "name": "Quantity selector" }, diff --git a/locales/es.json b/locales/es.json index b554ddcb9a8..e5e4ed42fd8 100644 --- a/locales/es.json +++ b/locales/es.json @@ -154,6 +154,12 @@ "choose_product_options": "Elegir opciones para {{ product_name }}", "value_unavailable": "{{ option_value }} (no disponible)", "variant_sold_out_or_unavailable": "Variante agotada o no disponible", + "inventory_in_stock": "En existencias", + "inventory_in_stock_show_count": "{{ quantity }} en existencias", + "inventory_low_stock": "Bajas existencias", + "inventory_low_stock_show_count": "Bajas existencias: quedan {{ quantity }}", + "inventory_out_of_stock": "Agotado", + "inventory_out_of_stock_continue_selling": "En existencias", "sku": "SKU" }, "modal": { diff --git a/locales/es.schema.json b/locales/es.schema.json index 3d4ca81d989..745914f3074 100644 --- a/locales/es.schema.json +++ b/locales/es.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Estado del inventario", + "settings": { + "text_style": { + "label": "Estilo de texto", + "options__1": { + "label": "Cuerpo" + }, + "options__2": { + "label": "Subtítulo" + }, + "options__3": { + "label": "Mayúscula" + } + }, + "inventory_threshold": { + "label": "Umbral de inventario bajo", + "info": "Elige 0 para que siempre se muestre en existencias si está disponible." + }, + "show_inventory_quantity": { + "label": "Mostrar recuento de inventario" + } + } } }, "settings": { diff --git a/locales/fi.json b/locales/fi.json index fd77bffc1e8..c33ae10d6c0 100644 --- a/locales/fi.json +++ b/locales/fi.json @@ -153,7 +153,13 @@ "choose_product_options": "Valitse vaihtoehtoja tuotteelle {{ product_name }}", "value_unavailable": "{{ option_value }} [ei saatavilla]", "variant_sold_out_or_unavailable": "Versio on loppuunmyyty tai ei saatavilla", - "sku": "SKU-koodi" + "inventory_in_stock": "Varastossa", + "inventory_in_stock_show_count": "{{ quantity }} varastossa", + "inventory_low_stock": "Varasto vähissä", + "inventory_low_stock_show_count": "Varasto vähissä: {{ quantity }} jäljellä", + "inventory_out_of_stock": "Loppunut varastosta", + "sku": "SKU-koodi", + "inventory_out_of_stock_continue_selling": "Varastossa" }, "modal": { "label": "Mediagalleria" diff --git a/locales/fi.schema.json b/locales/fi.schema.json index 944e4037dc2..5950f8f4f71 100644 --- a/locales/fi.schema.json +++ b/locales/fi.schema.json @@ -1829,6 +1829,30 @@ } } } + }, + "inventory": { + "name": "Varaston tila", + "settings": { + "text_style": { + "label": "Tekstityyli", + "options__1": { + "label": "Leipäteksti" + }, + "options__2": { + "label": "Alaotsikko" + }, + "options__3": { + "label": "Isot kirjaimet" + } + }, + "inventory_threshold": { + "label": "Vähäisen varaston kynnysarvo", + "info": "Valitse 0, jos haluat näyttää aina varastossa, jos saatavilla." + }, + "show_inventory_quantity": { + "label": "Näytä varastomäärä" + } + } } }, "settings": { diff --git a/locales/fr.json b/locales/fr.json index 7ce451a18f3..c074e732a23 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -154,7 +154,13 @@ "choose_product_options": "Choisir des options pour {{ product_name }}", "value_unavailable": "{{ option_value }} [Indisponible]", "variant_sold_out_or_unavailable": "Variante épuisée ou indisponible", - "sku": "SKU" + "inventory_in_stock": "En stock", + "inventory_in_stock_show_count": "{{ quantity }} en stock", + "inventory_low_stock": "Stock bas", + "inventory_low_stock_show_count": "Stock bas : {{ quantity }} restant(s)", + "sku": "SKU", + "inventory_out_of_stock": "En rupture de stock", + "inventory_out_of_stock_continue_selling": "En stock" }, "modal": { "label": "Galerie de supports multimédias" diff --git a/locales/fr.schema.json b/locales/fr.schema.json index ae3bd84abf1..24e99f2ba6a 100644 --- a/locales/fr.schema.json +++ b/locales/fr.schema.json @@ -1829,6 +1829,30 @@ } } } + }, + "inventory": { + "name": "État des stocks", + "settings": { + "text_style": { + "label": "Style de texte", + "options__1": { + "label": "Corps" + }, + "options__2": { + "label": "Sous‑titre" + }, + "options__3": { + "label": "Majuscule" + } + }, + "inventory_threshold": { + "label": "Seuil de stock faible", + "info": "Sélectionnez 0 pour toujours indiquer la quantité en stock, si disponible." + }, + "show_inventory_quantity": { + "label": "Afficher l'inventaire" + } + } } }, "settings": { diff --git a/locales/hr-HR.json b/locales/hr-HR.json index 8f65da1d3be..d2eae37b2b1 100644 --- a/locales/hr-HR.json +++ b/locales/hr-HR.json @@ -154,6 +154,12 @@ "choose_product_options": "Odaberite željene opcije za {{ product_name }}", "value_unavailable": "{{ option_value }} [Nedostupno]", "variant_sold_out_or_unavailable": "Model je prodan ili nedostupan", + "inventory_in_stock": "Dostupno", + "inventory_in_stock_show_count": "Br. dostupnih komada: {{ quantity }}", + "inventory_low_stock": "Preostalo malo komada", + "inventory_low_stock_show_count": "Preostalo malo komada: samo {{ quantity }}", + "inventory_out_of_stock": "Nema na zalihama", + "inventory_out_of_stock_continue_selling": "Dostupno", "sku": "Inventarna šifra proizvoda (SKU)" }, "modal": { diff --git a/locales/hu.json b/locales/hu.json index cffdbd9faee..33f43bd274f 100644 --- a/locales/hu.json +++ b/locales/hu.json @@ -153,6 +153,12 @@ "choose_product_options": "Termékváltozatok – {{ product_name }}", "value_unavailable": "{{ option_value }} [nincs készleten]", "variant_sold_out_or_unavailable": "A változat elfogyott vagy nincs készleten", + "inventory_in_stock": "Raktáron", + "inventory_in_stock_show_count": "{{ quantity }} raktáron", + "inventory_low_stock": "Alacsony készlet", + "inventory_low_stock_show_count": "Alacsony készlet: csak {{ quantity }} van raktáron", + "inventory_out_of_stock": "Nincs készleten", + "inventory_out_of_stock_continue_selling": "Raktáron", "sku": "Termékváltozat" }, "modal": { diff --git a/locales/id.json b/locales/id.json index db32f207ced..f8cb70cc418 100644 --- a/locales/id.json +++ b/locales/id.json @@ -153,6 +153,12 @@ "choose_product_options": "Pilih opsi untuk {{ product_name }}", "value_unavailable": "{{ option_value }} [Tidak Tersedia]", "variant_sold_out_or_unavailable": "Varian terjual habis atau tidak tersedia", + "inventory_in_stock": "Tersedia", + "inventory_in_stock_show_count": "{{ quantity }} tersedia", + "inventory_low_stock": "Stok sedikit", + "inventory_low_stock_show_count": "Stok sedikit: {{ quantity }} tersisa", + "inventory_out_of_stock": "Habis", + "inventory_out_of_stock_continue_selling": "Tersedia", "sku": "SKU" }, "modal": { diff --git a/locales/it.json b/locales/it.json index 302471b3f01..f8c3a40297b 100644 --- a/locales/it.json +++ b/locales/it.json @@ -154,6 +154,12 @@ "choose_product_options": "Scegli opzioni per {{ product_name }}", "value_unavailable": "{{ option_value }} [non disponibile]", "variant_sold_out_or_unavailable": "Variante esaurita o non disponibile", + "inventory_in_stock": "Disponibile", + "inventory_in_stock_show_count": "{{ quantity }} disponibile/i", + "inventory_low_stock": "Scorte ridotte", + "inventory_low_stock_show_count": "Scorte ridotte: ne restano {{ quantity }}", + "inventory_out_of_stock": "Esaurito", + "inventory_out_of_stock_continue_selling": "Disponibile", "sku": "SKU" }, "modal": { diff --git a/locales/it.schema.json b/locales/it.schema.json index a881238eb35..c916b151c6f 100644 --- a/locales/it.schema.json +++ b/locales/it.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Stato delle scorte", + "settings": { + "text_style": { + "label": "Stile testo", + "options__1": { + "label": "Corpo" + }, + "options__2": { + "label": "Sottotitolo" + }, + "options__3": { + "label": "Maiuscolo" + } + }, + "inventory_threshold": { + "label": "Soglia per le scorte scarse", + "info": "Scegli 0 per mostrare sempre disponibili, se stoccati." + }, + "show_inventory_quantity": { + "label": "Mostra conteggio delle scorte" + } + } } }, "settings": { diff --git a/locales/ja.json b/locales/ja.json index 00184780321..e0904796528 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -153,6 +153,12 @@ "choose_product_options": "{{ product_name }}のオプションを選択する", "value_unavailable": "{{ option_value }}は販売できません", "variant_sold_out_or_unavailable": "バリエーションは売り切れているか販売できません", + "inventory_in_stock": "在庫あり", + "inventory_in_stock_show_count": "{{ quantity }}個の在庫", + "inventory_low_stock": "低在庫", + "inventory_low_stock_show_count": "低在庫:残り{{ quantity }}個", + "inventory_out_of_stock": "在庫切れ", + "inventory_out_of_stock_continue_selling": "在庫あり", "sku": "SKU" }, "modal": { diff --git a/locales/ja.schema.json b/locales/ja.schema.json index 5525cd5640a..3e9e5a41ff8 100644 --- a/locales/ja.schema.json +++ b/locales/ja.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "在庫ステータス", + "settings": { + "text_style": { + "label": "テキストスタイル", + "options__1": { + "label": "本文" + }, + "options__2": { + "label": "サブタイトル" + }, + "options__3": { + "label": "大文字" + } + }, + "inventory_threshold": { + "label": "低在庫基準値", + "info": "0を選択すると、在庫がある場合は常に表示されます。" + }, + "show_inventory_quantity": { + "label": "在庫数を表示" + } + } } }, "settings": { diff --git a/locales/ko.json b/locales/ko.json index 3f7d70c3b34..b883efb26d8 100644 --- a/locales/ko.json +++ b/locales/ko.json @@ -153,6 +153,12 @@ "choose_product_options": "{{ product_name }}의 옵션 선택", "value_unavailable": "{{ option_value }}[구매할 수 없음]", "variant_sold_out_or_unavailable": "품절이거나 구매할 수 없는 이형 상품", + "inventory_in_stock": "재고 있음", + "inventory_in_stock_show_count": "재고 {{ quantity }}개", + "inventory_low_stock": "재고 부족", + "inventory_low_stock_show_count": "재고 부족: {{ quantity }}개 남음", + "inventory_out_of_stock": "품절", + "inventory_out_of_stock_continue_selling": "재고 있음", "sku": "SKU(재고 관리 코드)" }, "modal": { diff --git a/locales/ko.schema.json b/locales/ko.schema.json index 569f1dc5edd..17ce4d164d6 100644 --- a/locales/ko.schema.json +++ b/locales/ko.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "재고 상태", + "settings": { + "text_style": { + "label": "텍스트 스타일", + "options__1": { + "label": "본문" + }, + "options__2": { + "label": "부제목" + }, + "options__3": { + "label": "대문자" + } + }, + "inventory_threshold": { + "label": "재고 부족 임계값", + "info": "재고 있음을 가능한 경우 항상 표시하려면 0을 선택합니다." + }, + "show_inventory_quantity": { + "label": "재고 수 표시" + } + } } }, "settings": { diff --git a/locales/lt-LT.json b/locales/lt-LT.json index 6213ec4414d..100bb8463f8 100644 --- a/locales/lt-LT.json +++ b/locales/lt-LT.json @@ -155,6 +155,12 @@ "choose_product_options": "Rinktis {{ product_name }} variantus", "value_unavailable": "{{ option_value }} [Neturime]", "variant_sold_out_or_unavailable": "Prekė išparduota arba jos neturime", + "inventory_in_stock": "Yra sandėlyje", + "inventory_in_stock_show_count": "{{ quantity }} vnt. sandėlyje", + "inventory_low_stock": "Atsargos senka", + "inventory_low_stock_show_count": "Atsargos senka: liko {{ quantity }} vnt.", + "inventory_out_of_stock": "Neturime", + "inventory_out_of_stock_continue_selling": "Yra sandėlyje", "sku": "SKU kodas" }, "modal": { diff --git a/locales/nb.json b/locales/nb.json index bb8a593b8ed..0e71ad0612f 100644 --- a/locales/nb.json +++ b/locales/nb.json @@ -153,6 +153,12 @@ "choose_product_options": "Velg alternativer for {{ product_name }}", "value_unavailable": "{{ option_value }} [Utilgjengelig]", "variant_sold_out_or_unavailable": "Varianten er utsolgt eller utilgjengelig", + "inventory_in_stock": "På lager", + "inventory_in_stock_show_count": "{{ quantity }} på lager", + "inventory_low_stock": "Lav lagerbeholdning", + "inventory_low_stock_show_count": "Lav lagerbeholdning: {{ quantity }} igjen", + "inventory_out_of_stock": "Ikke på lager", + "inventory_out_of_stock_continue_selling": "På lager", "sku": "SKU" }, "modal": { diff --git a/locales/nb.schema.json b/locales/nb.schema.json index 3b0c084ba24..99e83d539a2 100644 --- a/locales/nb.schema.json +++ b/locales/nb.schema.json @@ -1829,6 +1829,30 @@ } } } + }, + "inventory": { + "name": "Lagerstatus", + "settings": { + "text_style": { + "label": "Tekststil", + "options__1": { + "label": "Brødtekst" + }, + "options__2": { + "label": "Undertekst" + }, + "options__3": { + "label": "Store bokstaver" + } + }, + "inventory_threshold": { + "label": "Terskel for lav lagerbeholdning", + "info": "Velg 0 for å alltid vise på lager hvis tilgjengelig." + }, + "show_inventory_quantity": { + "label": "Vis lagerantall" + } + } } }, "settings": { diff --git a/locales/nl.json b/locales/nl.json index 6b1998135cb..60f13c6fa1f 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -153,7 +153,13 @@ "choose_product_options": "Opties kiezen voor {{ product_name }}", "value_unavailable": "{{ option_value }} [Niet beschikbaar]", "variant_sold_out_or_unavailable": "Variant uitverkocht of niet beschikbaar", - "sku": "SKU" + "inventory_in_stock": "Op voorraad", + "inventory_in_stock_show_count": "{{ quantity }} op voorraad", + "inventory_low_stock": "Voorraad laag", + "inventory_low_stock_show_count": "Lage voorraad: nog maar {{ quantity }}", + "inventory_out_of_stock": "Niet op voorraad", + "sku": "SKU", + "inventory_out_of_stock_continue_selling": "Op voorraad" }, "modal": { "label": "Mediagalerij" diff --git a/locales/nl.schema.json b/locales/nl.schema.json index de1414629b3..ae5d59f2ba0 100644 --- a/locales/nl.schema.json +++ b/locales/nl.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Voorraadstatus", + "settings": { + "text_style": { + "label": "Tekststijl", + "options__1": { + "label": "Hoofdtekst" + }, + "options__2": { + "label": "Ondertitel" + }, + "options__3": { + "label": "Hoofdletters" + } + }, + "inventory_threshold": { + "label": "Drempelwaarde lage voorraad", + "info": "Kies 0 als je altijd 'Op voorraad' wilt weergeven als er voorraad beschikbaar is." + }, + "show_inventory_quantity": { + "label": "Voorraadhoeveelheid weergeven" + } + } } }, "settings": { diff --git a/locales/pl.json b/locales/pl.json index 55072ca2b96..147b3c71b90 100644 --- a/locales/pl.json +++ b/locales/pl.json @@ -155,6 +155,12 @@ "choose_product_options": "Wybierz opcje dla {{ product_name }}", "value_unavailable": "{{ option_value }} [niedostępne]", "variant_sold_out_or_unavailable": "Wariant wyprzedany lub niedostępny", + "inventory_in_stock": "W magazynie", + "inventory_in_stock_show_count": "{{ quantity }} w magazynie", + "inventory_low_stock": "Niski poziom zapasów", + "inventory_low_stock_show_count": "Niski poziom zapasów: pozostało {{ quantity }}", + "inventory_out_of_stock": "Brak na stanie", + "inventory_out_of_stock_continue_selling": "W magazynie", "sku": "SKU" }, "modal": { diff --git a/locales/pl.schema.json b/locales/pl.schema.json index 5553304c58e..891947c7915 100644 --- a/locales/pl.schema.json +++ b/locales/pl.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Status zapasów", + "settings": { + "text_style": { + "label": "Styl tekstu", + "options__1": { + "label": "Tekst podstawowy" + }, + "options__2": { + "label": "Podtytuł" + }, + "options__3": { + "label": "Duże litery" + } + }, + "inventory_threshold": { + "label": "Niski próg zapasów", + "info": "Wybierz 0, aby zawsze pokazywać w magazynie, jeśli jest dostępny." + }, + "show_inventory_quantity": { + "label": "Pokaż ilość zapasów" + } + } } }, "settings": { diff --git a/locales/pt-BR.json b/locales/pt-BR.json index 745803193b0..771748157c8 100644 --- a/locales/pt-BR.json +++ b/locales/pt-BR.json @@ -154,6 +154,12 @@ "choose_product_options": "Escolha opções para {{ product_name }}", "value_unavailable": "{{ option_value }} (indisponível)", "variant_sold_out_or_unavailable": "Variante esgotada ou indisponível", + "inventory_in_stock": "Em estoque", + "inventory_in_stock_show_count": "{{ quantity }} em estoque", + "inventory_low_stock": "Estoque baixo", + "inventory_low_stock_show_count": "Estoque baixo: {{ quantity }} restante(s)", + "inventory_out_of_stock": "Fora de estoque", + "inventory_out_of_stock_continue_selling": "Em estoque", "sku": "SKU" }, "modal": { diff --git a/locales/pt-BR.schema.json b/locales/pt-BR.schema.json index 199fc519bf3..fae77f3fe89 100644 --- a/locales/pt-BR.schema.json +++ b/locales/pt-BR.schema.json @@ -1829,6 +1829,30 @@ } } } + }, + "inventory": { + "name": "Status do estoque", + "settings": { + "text_style": { + "label": "Estilo de texto", + "options__1": { + "label": "Corpo" + }, + "options__2": { + "label": "Legenda" + }, + "options__3": { + "label": "Letras maiúsculas" + } + }, + "inventory_threshold": { + "label": "Limite de estoque baixo", + "info": "Escolha 0 para sempre mostrar no estoque, se disponível." + }, + "show_inventory_quantity": { + "label": "Mostrar contagem de estoque" + } + } } }, "settings": { diff --git a/locales/pt-PT.json b/locales/pt-PT.json index 6e05d5a0ea6..574dd463bef 100644 --- a/locales/pt-PT.json +++ b/locales/pt-PT.json @@ -154,6 +154,12 @@ "choose_product_options": "Escolha opções para {{ product_name }}", "value_unavailable": "{{ option_value }} [Indisponível]", "variant_sold_out_or_unavailable": "Variante esgotada ou indisponível", + "inventory_in_stock": "Em stock", + "inventory_in_stock_show_count": "{{ quantity }} em stock", + "inventory_low_stock": "Stock reduzido", + "inventory_low_stock_show_count": "Stock reduzido: {{ quantity }} restantes", + "inventory_out_of_stock": "Esgotado", + "inventory_out_of_stock_continue_selling": "Em stock", "sku": "SKU" }, "modal": { diff --git a/locales/pt-PT.schema.json b/locales/pt-PT.schema.json index 8ad55da5c64..13892f402d5 100644 --- a/locales/pt-PT.schema.json +++ b/locales/pt-PT.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Estado do inventário", + "settings": { + "text_style": { + "label": "Estilo de texto", + "options__1": { + "label": "Corpo" + }, + "options__2": { + "label": "Legenda" + }, + "options__3": { + "label": "Maiúsculas" + } + }, + "inventory_threshold": { + "label": "Limite do inventário baixo", + "info": "Escolha 0 para mostrar sempre em stock, se disponível." + }, + "show_inventory_quantity": { + "label": "Mostrar contagem de inventário" + } + } } }, "settings": { diff --git a/locales/ro-RO.json b/locales/ro-RO.json index 6c8eae4d2eb..0ff9343dcb4 100644 --- a/locales/ro-RO.json +++ b/locales/ro-RO.json @@ -154,6 +154,12 @@ "choose_product_options": "Alege opțiunile pentru {{ product_name }}", "value_unavailable": "{{ option_value }} [indisponibil]", "variant_sold_out_or_unavailable": "Varianta are stocul epuizat sau este indisponibilă", + "inventory_in_stock": "În stoc", + "inventory_in_stock_show_count": "{{ quantity }} în stoc", + "inventory_low_stock": "Stoc redus", + "inventory_low_stock_show_count": "Stoc redus: doar {{ quantity }} articole rămase", + "inventory_out_of_stock": "Nu există în stoc", + "inventory_out_of_stock_continue_selling": "În stoc", "sku": "SKU" }, "modal": { diff --git a/locales/ru.json b/locales/ru.json index 4a5489e2a5a..aeeb42de109 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -155,6 +155,12 @@ "choose_product_options": "Выберите варианты для {{ product_name }}", "value_unavailable": "{{ option_value }} [Недоступно]", "variant_sold_out_or_unavailable": "Вариант распродан или недоступен", + "inventory_in_stock": "В наличии", + "inventory_in_stock_show_count": "В наличии: {{ quantity }}", + "inventory_low_stock": "Заканчивается", + "inventory_low_stock_show_count": "Заканчивается. Осталось: {{ quantity }}", + "inventory_out_of_stock": "Нет в наличии", + "inventory_out_of_stock_continue_selling": "В наличии", "sku": "Артикул" }, "modal": { diff --git a/locales/sk-SK.json b/locales/sk-SK.json index 1a869a9ce29..75c98ecee22 100644 --- a/locales/sk-SK.json +++ b/locales/sk-SK.json @@ -155,6 +155,12 @@ "choose_product_options": "Vyberte možnosti pre: {{ product_name }}", "value_unavailable": "{{ option_value }} [nedostupné]", "variant_sold_out_or_unavailable": "Variant je vypredaný alebo nedostupný", + "inventory_in_stock": "Skladom", + "inventory_in_stock_show_count": "{{ quantity }} skladom", + "inventory_low_stock": "Nízky stav zásob", + "inventory_low_stock_show_count": "Nízky stav zásob: zostáva {{ quantity }}", + "inventory_out_of_stock": "Vypredané", + "inventory_out_of_stock_continue_selling": "Skladom", "sku": "Jednotka SKU" }, "modal": { diff --git a/locales/sl-SI.json b/locales/sl-SI.json index 0bf96fbbb7c..540177b0aa7 100644 --- a/locales/sl-SI.json +++ b/locales/sl-SI.json @@ -155,6 +155,12 @@ "choose_product_options": "Izberite možnosti za izdelek {{ product_name }}", "value_unavailable": "{{ option_value }} [ni na voljo]", "variant_sold_out_or_unavailable": "Različica je razprodana ali ni na voljo", + "inventory_in_stock": "Na zalogi", + "inventory_in_stock_show_count": "Na zalogi: {{ quantity }}", + "inventory_low_stock": "Majhna zaloga", + "inventory_low_stock_show_count": "Majhna zaloga, preostalo še: {{ quantity }}", + "inventory_out_of_stock": "Ni na zalogi", + "inventory_out_of_stock_continue_selling": "Na zalogi", "sku": "Inventarna številka" }, "modal": { diff --git a/locales/sv.json b/locales/sv.json index 6c221f2e305..7deb0589a18 100644 --- a/locales/sv.json +++ b/locales/sv.json @@ -153,6 +153,12 @@ "choose_product_options": "Välj alternativ för {{ product_name }}", "value_unavailable": "{{ option_value }} [Inte tillgänglig]", "variant_sold_out_or_unavailable": "Varianten är slutsåld eller inte tillgänglig", + "inventory_in_stock": "I lager", + "inventory_in_stock_show_count": "{{ quantity }} i lager", + "inventory_low_stock": "Låg lagernivå", + "inventory_low_stock_show_count": "Låg lagernivå: {{ quantity }} kvar", + "inventory_out_of_stock": "Slut i lager", + "inventory_out_of_stock_continue_selling": "I lager", "sku": "Lagerhållningsenhet" }, "modal": { diff --git a/locales/sv.schema.json b/locales/sv.schema.json index 61247a21918..4d046fd4177 100644 --- a/locales/sv.schema.json +++ b/locales/sv.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Lagerstatus", + "settings": { + "text_style": { + "label": "Textstil", + "options__1": { + "label": "Brödtext" + }, + "options__2": { + "label": "Underrubrik" + }, + "options__3": { + "label": "Stora bokstäver" + } + }, + "inventory_threshold": { + "label": "Tröskel för låg lagernivå", + "info": "Välj 0 för att alltid visa i lager om tillgängligt." + }, + "show_inventory_quantity": { + "label": "Visa inventering" + } + } } }, "settings": { diff --git a/locales/th.json b/locales/th.json index cf618a4c0e9..c5f335c9297 100644 --- a/locales/th.json +++ b/locales/th.json @@ -153,7 +153,13 @@ "choose_product_options": "เลือกตัวเลือกสำหรับ {{ product_name }}", "value_unavailable": "{{ option_value }} [ไม่พร้อมใช้งาน]", "variant_sold_out_or_unavailable": "ตัวเลือกสินค้าขายหมดแล้วหรือไม่พร้อมจำหน่าย", - "sku": "SKU" + "inventory_in_stock": "มีในสต็อก", + "inventory_in_stock_show_count": "มี {{ quantity }} รายการในสต็อกสินค้า", + "inventory_low_stock": "สต็อกสินค้าเหลือน้อย", + "inventory_low_stock_show_count": "สต็อกสินค้าเหลือน้อย: เหลือ {{ quantity }} ชิ้น", + "inventory_out_of_stock": "หมดสต็อก", + "sku": "SKU", + "inventory_out_of_stock_continue_selling": "มีในสต็อก" }, "modal": { "label": "แกลเลอรีสื่อ" diff --git a/locales/th.schema.json b/locales/th.schema.json index b96c95cf95b..57afc27a2d0 100644 --- a/locales/th.schema.json +++ b/locales/th.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "สถานะสินค้าคงคลัง", + "settings": { + "text_style": { + "label": "รูปแบบข้อความ", + "options__1": { + "label": "เนื้อหา" + }, + "options__2": { + "label": "หัวเรื่องย่อย" + }, + "options__3": { + "label": "ตัวพิมพ์ใหญ่" + } + }, + "inventory_threshold": { + "label": "เกณฑ์สินค้าคงคลังต่ำ", + "info": "เลือกเป็น 0 เพื่อแสดงว่ามีสินค้าตลอดเวลา หากมีสินค้า" + }, + "show_inventory_quantity": { + "label": "แสดงจำนวนสินค้าคงคลัง" + } + } } }, "settings": { diff --git a/locales/tr.json b/locales/tr.json index e462e8066fa..d99283899e0 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -153,6 +153,12 @@ "choose_product_options": "{{ product_name }} için seçenekleri belirle", "value_unavailable": "{{ option_value }} [Kullanılamıyor]", "variant_sold_out_or_unavailable": "Varyasyon tükendi veya kullanılamıyor", + "inventory_in_stock": "Stokta", + "inventory_in_stock_show_count": "Stokta {{ quantity }} adet mevcut", + "inventory_low_stock": "Stok düzeyi düşük", + "inventory_low_stock_show_count": "Stok düzeyi düşük: {{ quantity }} adet kaldı", + "inventory_out_of_stock": "Stokta yok", + "inventory_out_of_stock_continue_selling": "Stokta", "sku": "SKU" }, "modal": { diff --git a/locales/tr.schema.json b/locales/tr.schema.json index e7d54a9bbfb..d6d2c82c609 100644 --- a/locales/tr.schema.json +++ b/locales/tr.schema.json @@ -1829,6 +1829,30 @@ } } } + }, + "inventory": { + "name": "Envanter durumu", + "settings": { + "text_style": { + "label": "Metin stili", + "options__1": { + "label": "Gövde" + }, + "options__2": { + "label": "Alt yazı" + }, + "options__3": { + "label": "Büyük harf" + } + }, + "inventory_threshold": { + "label": "Düşük envanter eşiği", + "info": "Mevcutsa her zaman stokta göstermek için 0 değerini seçin" + }, + "show_inventory_quantity": { + "label": "Envanter sayımını göster" + } + } } }, "settings": { diff --git a/locales/vi.json b/locales/vi.json index 0c229b0a0cf..57a37c1e954 100644 --- a/locales/vi.json +++ b/locales/vi.json @@ -153,6 +153,12 @@ "choose_product_options": "Chọn tùy chọn cho {{ product_name }}", "value_unavailable": "{{ option_value }} [Không còn hàng]", "variant_sold_out_or_unavailable": "Mẫu mã đã bán hết hoặc không còn hàng", + "inventory_in_stock": "Còn hàng", + "inventory_in_stock_show_count": "Còn {{ quantity }} hàng lưu kho", + "inventory_low_stock": "Sắp hết hàng", + "inventory_low_stock_show_count": "Sắp hết hàng: Còn {{ quantity }}", + "inventory_out_of_stock": "Hết hàng", + "inventory_out_of_stock_continue_selling": "Còn hàng", "sku": "SKU" }, "modal": { diff --git a/locales/vi.schema.json b/locales/vi.schema.json index 2747c124880..cff17943ddc 100644 --- a/locales/vi.schema.json +++ b/locales/vi.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "Trạng thái hàng lưu kho", + "settings": { + "text_style": { + "label": "Kiểu văn bản", + "options__1": { + "label": "Nội dung" + }, + "options__2": { + "label": "Tiêu đề phụ" + }, + "options__3": { + "label": "Chữ viết hoa" + } + }, + "inventory_threshold": { + "label": "Ngưỡng hàng trong kho thấp", + "info": "Chọn 0 để luôn hiển thị còn hàng nếu có." + }, + "show_inventory_quantity": { + "label": "Hiển thị số lượng hàng trong kho" + } + } } }, "settings": { diff --git a/locales/zh-CN.json b/locales/zh-CN.json index a18bf8326fb..848ed1af764 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -153,6 +153,12 @@ "choose_product_options": "选择用于 {{ product_name }} 的选项", "value_unavailable": "{{ option_value }} [不可用]", "variant_sold_out_or_unavailable": "多属性已售罄或不可用", + "inventory_in_stock": "现货", + "inventory_in_stock_show_count": "{{ quantity }} 件存货", + "inventory_low_stock": "低库存", + "inventory_low_stock_show_count": "低库存:剩余 {{ quantity }}", + "inventory_out_of_stock": "缺货", + "inventory_out_of_stock_continue_selling": "现货", "sku": "SKU" }, "modal": { diff --git a/locales/zh-CN.schema.json b/locales/zh-CN.schema.json index 81888326ffa..bb40d01474d 100644 --- a/locales/zh-CN.schema.json +++ b/locales/zh-CN.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "库存状态", + "settings": { + "text_style": { + "label": "文本样式", + "options__1": { + "label": "正文" + }, + "options__2": { + "label": "副标题" + }, + "options__3": { + "label": "大写" + } + }, + "inventory_threshold": { + "label": "低库存阈值", + "info": "选择 0 即可始终在产品可售时显示“有货”。" + }, + "show_inventory_quantity": { + "label": "显示库存计数" + } + } } }, "settings": { diff --git a/locales/zh-TW.json b/locales/zh-TW.json index d5621f1610f..cf04fb4668e 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -153,6 +153,12 @@ "choose_product_options": "選擇 {{ product_name }} 的選項", "value_unavailable": "{{ option_value }} [無法供貨]", "variant_sold_out_or_unavailable": "子類已售罄或無法供貨", + "inventory_in_stock": "有庫存", + "inventory_in_stock_show_count": "有 {{ quantity }} 件庫存", + "inventory_low_stock": "庫存不足", + "inventory_low_stock_show_count": "庫存不足:剩餘 {{ quantity }} 件", + "inventory_out_of_stock": "無庫存", + "inventory_out_of_stock_continue_selling": "有庫存", "sku": "存貨單位 (SKU)" }, "modal": { diff --git a/locales/zh-TW.schema.json b/locales/zh-TW.schema.json index c5be7f6742f..1554153698b 100644 --- a/locales/zh-TW.schema.json +++ b/locales/zh-TW.schema.json @@ -1830,6 +1830,30 @@ } } } + }, + "inventory": { + "name": "庫存狀態", + "settings": { + "text_style": { + "label": "文字樣式", + "options__1": { + "label": "內文" + }, + "options__2": { + "label": "副標題" + }, + "options__3": { + "label": "大寫" + } + }, + "inventory_threshold": { + "label": "庫存過低門檻", + "info": "選擇 0 以便一律顯示「有庫存」(若適用)。" + }, + "show_inventory_quantity": { + "label": "顯示庫存數量" + } + } } }, "settings": { diff --git a/sections/featured-product.liquid b/sections/featured-product.liquid index 169c3167328..ef4a357f0f2 100644 --- a/sections/featured-product.liquid +++ b/sections/featured-product.liquid @@ -313,8 +313,8 @@ value="{{ variant.id }}" > {{ variant.title }} - {%- if variant.available == false %} - {{ 'products.product.sold_out' | t }}{% endif %} - {{ variant.price | money | strip_html }} + {%- if variant.available == false %} - {{ 'products.product.sold_out' | t }}{% endif %} {%- endfor -%} diff --git a/sections/main-product.liquid b/sections/main-product.liquid index 777558161f7..a604992ec74 100644 --- a/sections/main-product.liquid +++ b/sections/main-product.liquid @@ -112,6 +112,53 @@ {{ form | payment_terms }} {%- endform -%} + {%- when 'inventory' -%} +

+ {%- if product.selected_or_first_available_variant.inventory_management == 'shopify' -%} + {%- if product.selected_or_first_available_variant.inventory_quantity > 0 -%} + {%- if product.selected_or_first_available_variant.inventory_quantity <= block.settings.inventory_threshold -%} + + {%- if block.settings.show_inventory_quantity -%} + {{- 'products.product.inventory_low_stock_show_count' | t: quantity: product.selected_or_first_available_variant.inventory_quantity -}} + {%- else -%} + {{- 'products.product.inventory_low_stock' | t -}} + {%- endif -%} + {%- else -%} + + {%- if block.settings.show_inventory_quantity -%} + {{- 'products.product.inventory_in_stock_show_count' | t: quantity: product.selected_or_first_available_variant.inventory_quantity -}} + {%- else -%} + {{- 'products.product.inventory_in_stock' | t -}} + {%- endif -%} + {%- endif -%} + {%- else -%} + {%- if product.selected_or_first_available_variant.inventory_policy == 'continue' -%} + + {{- 'products.product.inventory_out_of_stock_continue_selling' | t -}} + {%- else -%} + + {{- 'products.product.inventory_out_of_stock' | t -}} + {%- endif -%} + {%- endif -%} + {%- endif -%} +

{%- when 'description' -%} {%- if product.description != blank -%}
@@ -325,8 +372,8 @@ value="{{ variant.id }}" > {{ variant.title }} - {%- if variant.available == false %} - {{ 'products.product.sold_out' | t }}{% endif %} - {{ variant.price | money | strip_html }} + {%- if variant.available == false %} - {{ 'products.product.sold_out' | t }}{% endif %} {%- endfor -%} @@ -857,6 +904,49 @@ } ] }, + { + "type": "inventory", + "name": "t:sections.main-product.blocks.inventory.name", + "limit": 1, + "settings": [ + { + "type": "select", + "id": "text_style", + "options": [ + { + "value": "body", + "label": "t:sections.main-product.blocks.inventory.settings.text_style.options__1.label" + }, + { + "value": "subtitle", + "label": "t:sections.main-product.blocks.inventory.settings.text_style.options__2.label" + }, + { + "value": "uppercase", + "label": "t:sections.main-product.blocks.inventory.settings.text_style.options__3.label" + } + ], + "default": "body", + "label": "t:sections.main-product.blocks.inventory.settings.text_style.label" + }, + { + "type": "range", + "id": "inventory_threshold", + "label": "t:sections.main-product.blocks.inventory.settings.inventory_threshold.label", + "min": 0, + "max": 100, + "step": 1, + "info": "t:sections.main-product.blocks.inventory.settings.inventory_threshold.info", + "default": 10 + }, + { + "type": "checkbox", + "id": "show_inventory_quantity", + "label": "t:sections.main-product.blocks.inventory.settings.show_inventory_quantity.label", + "default": true + } + ] + }, { "type": "quantity_selector", "name": "t:sections.main-product.blocks.quantity_selector.name",