littleshop/LittleShop
sysadmin eb87148c63 Add variant collections system and enhance ProductVariant with weight/stock tracking
This commit introduces a comprehensive variant management system and enhances
the existing ProductVariant model with per-variant weight overrides and stock
tracking, integrated across Admin Panel and TeleBot.

Features Added:
- Variant Collections: Reusable variant templates (e.g., "Standard Sizes")
- Admin UI for managing variant collections (CRUD operations)
- Dynamic variant editor with JavaScript-based UI
- Per-variant weight and weight unit overrides
- Per-variant stock level tracking
- SalesLedger model for financial tracking

ProductVariant Enhancements:
- Added Weight (decimal, nullable) field for variant-specific weights
- Added WeightUnit (enum, nullable) field for variant-specific units
- Maintains backward compatibility with product-level weights

TeleBot Integration:
- Enhanced variant selection UI to display stock levels
- Shows weight information with proper unit conversion (µg, g, oz, lb, ml, L)
- Compact button format: "Medium (15 in stock, 350g)"
- Real-time stock availability display

Database Migrations:
- 20250928014850_AddVariantCollectionsAndSalesLedger
- 20250928155814_AddWeightToProductVariants

Technical Changes:
- Updated Product model to support VariantCollectionId and VariantsJson
- Extended ProductService with variant collection operations
- Enhanced OrderService to handle variant-specific pricing and weights
- Updated LittleShop.Client DTOs to match server models
- Added JavaScript dynamic variant form builder

Files Modified: 15
Files Added: 17
Lines Changed: ~2000

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 17:03:09 +01:00
..
Areas/Admin Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
Controllers Fix compilation error in TestController 2025-09-27 07:44:03 +01:00
Data Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
DTOs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
Enums Implement product variations, enhanced order workflow, mobile responsiveness, and product import system 2025-09-18 01:39:31 +01:00
Hubs Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
Mapping Add customer communication system 2025-08-27 18:02:39 +01:00
Migrations Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
Models Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
Pages Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
publish Deploy LittleShop to Hostinger with Docker and BunkerWeb 2025-09-24 13:00:17 +01:00
Services Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
TestAgent_Results Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
Validators Implement complete e-commerce functionality with shipping and order management 2025-08-20 17:37:24 +01:00
Views Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
wwwroot Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
_Imports.razor Refactor payment verification to manual workflow and add comprehensive cleanup tools 2025-09-25 19:29:00 +01:00
.dockerignore Add customer communication system 2025-08-27 18:02:39 +01:00
AddMultiBuysTable.csx 🔒 SECURITY: Emergency fixes and hardening 2025-09-22 05:45:49 +01:00
admin-cookies.jar Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
admin-test.jar Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
App.razor Refactor payment verification to manual workflow and add comprehensive cleanup tools 2025-09-25 19:29:00 +01:00
appsettings.Development.json 🔒 SECURITY: Emergency fixes and hardening 2025-09-22 05:45:49 +01:00
appsettings.Hostinger.json Update BTCPay integration with production credentials and deployment documentation 2025-09-19 11:17:43 +01:00
appsettings.json Deploy LittleShop to Hostinger with Docker and BunkerWeb 2025-09-24 13:00:17 +01:00
appsettings.Production.json 🔒 SECURITY: Emergency fixes and hardening 2025-09-22 05:45:49 +01:00
appsettings.Production.json.bak final 2025-08-27 22:19:39 +01:00
cookies.jar Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
cookies.txt Refactor payment verification to manual workflow and add comprehensive cleanup tools 2025-09-25 19:29:00 +01:00
Dockerfile Add customer communication system 2025-08-27 18:02:39 +01:00
littleshop-deploy.tar.gz Deploy LittleShop to Hostinger with Docker and BunkerWeb 2025-09-24 13:00:17 +01:00
littleshop-wizard-fixed.tar.gz Add customer communication system 2025-08-27 18:02:39 +01:00
LittleShop.csproj Add version 1.0.5 and /api/version endpoint 2025-09-27 09:46:13 +01:00
littleshop.db.backup Update LittleShop configuration and deployment files 2025-09-18 19:27:58 +01:00
new-admin.jar Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
packages-microsoft-prod.deb Implement complete e-commerce functionality with shipping and order management 2025-08-20 17:37:24 +01:00
Program.cs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
runtime-cookies.txt Add customer communication system 2025-08-27 18:02:39 +01:00
test-cookies.txt Add customer communication system 2025-08-27 18:02:39 +01:00
test-new-admin.jar Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
test-session.jar Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
test-session.txt Add customer communication system 2025-08-27 18:02:39 +01:00
test-wizard.html Add customer communication system 2025-08-27 18:02:39 +01:00
wizard-result.html Add customer communication system 2025-08-27 18:02:39 +01:00
wizard.html Add customer communication system 2025-08-27 18:02:39 +01:00