diff --git a/src/Kentico.Xperience.Shopify/Products/ShopifyProductService.cs b/src/Kentico.Xperience.Shopify/Products/ShopifyProductService.cs index f03297a..f8d1c5b 100644 --- a/src/Kentico.Xperience.Shopify/Products/ShopifyProductService.cs +++ b/src/Kentico.Xperience.Shopify/Products/ShopifyProductService.cs @@ -222,18 +222,18 @@ private async Task> GetVariantsFromA private ProductVariantListModel GetVariantListModel(ProductVariant variant, string currencyCode, Dictionary inventoryItems) { var prices = variant.PresentmentPrices.First(); - bool onStock = true; + bool inStock = true; if (inventoryItems.TryGetValue(variant.InventoryItemId ?? 0, out var inventoryItem)) { - onStock = !(inventoryItem.Tracked ?? false) || variant.InventoryQuantity > 0; + inStock = !(inventoryItem.Tracked ?? false) || variant.InventoryQuantity > 0; } return new ProductVariantListModel() { PriceFormatted = prices.Price.Amount.FormatPrice(currencyCode), ListPriceFormatted = prices.CompareAtPrice?.Amount.FormatPrice(currencyCode), - StockCssClass = onStock ? "available" : "unavailable", - StockStatusText = onStock ? "On stock" : "Out of stock", - Available = onStock, + StockCssClass = inStock ? "available" : "unavailable", + StockStatusText = inStock ? "In stock" : "Out of stock", + Available = inStock, MerchandiseID = variant.AdminGraphQLAPIId, }; }