Add: Debug logging for product variant data in TeleBot
Log variant count and prices when fetching products to diagnose why variants aren't being detected during add-to-cart flow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
aa06f420fe
commit
23794610d9
@ -146,6 +146,13 @@ namespace TeleBot.Services
|
||||
|
||||
if (result.IsSuccess && result.Data != null && result.Data.IsActive)
|
||||
{
|
||||
_logger.LogInformation("GetProduct {ProductId}: {Name} | Variants: {Count} | Base Price: £{Price}",
|
||||
productId, result.Data.Name, result.Data.Variants?.Count ?? 0, result.Data.Price);
|
||||
if (result.Data.Variants?.Any() == true)
|
||||
{
|
||||
_logger.LogInformation(" First variant: {Name} at £{Price}",
|
||||
result.Data.Variants.First().Name, result.Data.Variants.First().Price);
|
||||
}
|
||||
return result.Data;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user