littleshop/LittleShop/Areas/Admin/Controllers
SysAdmin 2c5815510d Fix: Display variant price and stock directly in Product Edit page
**Problem:**
- Variant price overrides and stock quantities were hidden in collapsible
  panels in the Product Edit page
- The Edit page was showing the VariantCollections system (VariantsJson)
  instead of the actual ProductVariant records created by text import
- User had to expand each variant panel to see price and stock values

**Solution:**
1. **ProductsController.cs (Lines 101-103):**
   - Added call to GetProductVariantsAsync() to load actual variant records
   - Added ViewData["ProductVariants"] to pass data to view

2. **Edit.cshtml (Lines 320-413):**
   - Added new collapsible section "Product Variants"
   - Displays variants in a table with directly visible columns:
     * Name, Type, Price, Stock Level, Sort Order, Status
   - No hidden panels - all information visible at a glance
   - Added quick summary with total variants, stock, and price range
   - Includes helpful links to ProductVariants management page

**Technical Details:**
- Price displays in green with £ symbol when override exists
- Stock shows color-coded badges (green=in stock, red=out of stock)
- Section only appears if variants exist (conditional rendering)
- Expanded by default (aria-expanded="true") for immediate visibility

**Impact:**
- User can now see all variant prices and stock quantities immediately
- No need to click/expand individual variant panels
- Better UX for products imported via text import format
- Maintains separation between VariantCollections system and ProductVariants

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 17:48:05 +01:00
..
AccountController.cs Fix login: Make username parameter case-insensitive 2025-09-24 22:26:16 +01:00
ActivityController.cs Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
BotActivityController.cs Add product variants system and live bot activity dashboard 2025-09-24 23:00:20 +01:00
BotRecoveryController.cs Implement comprehensive notification system for LittleShop 2025-09-19 16:17:24 +01:00
BotsController.cs Implement product variations, enhanced order workflow, mobile responsiveness, and product import system 2025-09-18 01:39:31 +01:00
CategoriesController.cs Debug: Add logging to Categories Edit POST action 2025-10-03 13:42:51 +01:00
DashboardController.cs Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
MessagesController.cs Security: Fix critical vulnerabilities and implement security hardening 2025-09-19 11:56:12 +01:00
OrdersController.cs Add explicit antiforgery configuration and better error handling for UpdateStatus 2025-09-24 16:49:21 +01:00
ProductsController.cs Fix: Display variant price and stock directly in Product Edit page 2025-10-08 17:48:05 +01:00
ReviewsController.cs Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
ShippingRatesController.cs Security: Fix critical vulnerabilities and implement security hardening 2025-09-19 11:56:12 +01:00
SystemSettingsController.cs Deploy LittleShop to Hostinger with Docker and BunkerWeb 2025-09-24 13:00:17 +01:00
UsersController.cs Security: Fix critical vulnerabilities and implement security hardening 2025-09-19 11:56:12 +01:00
VariantCollectionsController.cs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00