From 6f4befa1888d408bc57a539f07811c29833802b1 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Sun, 5 Oct 2025 16:58:35 +0100 Subject: [PATCH] Debug: Add logging to GetProductByIdAsync --- LittleShop/Services/ProductService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LittleShop/Services/ProductService.cs b/LittleShop/Services/ProductService.cs index 2e52be4..96cb544 100644 --- a/LittleShop/Services/ProductService.cs +++ b/LittleShop/Services/ProductService.cs @@ -198,6 +198,12 @@ public class ProductService : IProductService .OrderBy(v => v.SortOrder) .ToListAsync(); + Console.WriteLine($"[DEBUG GetProductById] ProductId: {id}, Variants loaded: {variants.Count}"); + foreach (var v in variants.Take(3)) + { + Console.WriteLine($"[DEBUG GetProductById] - {v.VariantType}: {v.Name}"); + } + return new ProductDto { Id = product.Id,