From 147e96a0840832ca94a7a9bb086a60031d5acebc Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Mon, 6 Oct 2025 00:35:30 +0100 Subject: [PATCH] UI: Remove Variants info button and rename Add to Cart to BUY {PRODUCTNAME} - Removed informational 'Variants: Size: X options, Color: Y options' button - Renamed 'Add to Cart' button to 'BUY {product.Name}' for clearer UX - Applied to both multi-buy single item and regular quantity purchase buttons --- TeleBot/TeleBot/UI/MenuBuilder.cs | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/TeleBot/TeleBot/UI/MenuBuilder.cs b/TeleBot/TeleBot/UI/MenuBuilder.cs index a22d57d..c9af725 100644 --- a/TeleBot/TeleBot/UI/MenuBuilder.cs +++ b/TeleBot/TeleBot/UI/MenuBuilder.cs @@ -135,7 +135,7 @@ namespace TeleBot.UI buttons.Add(new[] { InlineKeyboardButton.WithCallbackData( - $"🛒 Single Item - £{product.Price:F2}", + $"🛒 BUY {product.Name} - £{product.Price:F2}", singleCallbackData ) }); @@ -152,39 +152,19 @@ namespace TeleBot.UI buttons.Add(quantityButtons.ToArray()); - // Add to cart button + // Buy button var addCallbackData = hasVariants ? _mapper.BuildCallback("selectvar", product.Id, quantity) : _mapper.BuildCallback("add", product.Id, quantity); buttons.Add(new[] { InlineKeyboardButton.WithCallbackData( - $"🛒 Add to Cart - £{product.Price * quantity:F2}", + $"🛒 BUY {product.Name} - £{product.Price * quantity:F2}", addCallbackData ) }); } - // Show variant info if available - if (hasVariants) - { - var variantTypes = product.Variants - .Where(v => v.IsActive) - .GroupBy(v => v.VariantType) - .Select(g => $"{g.Key}: {g.Count()} options") - .ToList(); - - if (variantTypes.Any()) - { - buttons.Add(new[] { - InlineKeyboardButton.WithCallbackData( - $"🎨 Variants: {string.Join(", ", variantTypes)}", - "noop" - ) - }); - } - } - // Navigation buttons.Add(new[] { InlineKeyboardButton.WithCallbackData("⬅️ Back to Products", "browse") });