Implement product multi-buys and variants system
Major restructuring of product variations: - Renamed ProductVariation to ProductMultiBuy for quantity-based pricing (e.g., "3 for £25") - Added new ProductVariant model for string-based options (colors, flavors) - Complete separation of multi-buy pricing from variant selection Features implemented: - Multi-buy deals with automatic price-per-unit calculation - Product variants for colors/flavors/sizes with stock tracking - TeleBot checkout supports both multi-buys and variant selection - Shopping cart correctly calculates multi-buy bundle prices - Order system tracks selected variants and multi-buy choices - Real-time bot activity monitoring with SignalR - Public bot directory page with QR codes for Telegram launch - Admin dashboard shows multi-buy and variant metrics Technical changes: - Updated all DTOs, services, and controllers - Fixed cart total calculation for multi-buy bundles - Comprehensive test coverage for new functionality - All existing tests passing with new features Database changes: - Migrated ProductVariations to ProductMultiBuys - Added ProductVariants table - Updated OrderItems to track variants 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -129,9 +129,9 @@
|
||||
@foreach (var item in order.Items.Take(2))
|
||||
{
|
||||
<div>@item.Quantity× @item.ProductName</div>
|
||||
@if (!string.IsNullOrEmpty(item.ProductVariationName))
|
||||
@if (!string.IsNullOrEmpty(item.ProductMultiBuyName))
|
||||
{
|
||||
<small class="text-muted">(@item.ProductVariationName)</small>
|
||||
<small class="text-muted">(@item.ProductMultiBuyName)</small>
|
||||
}
|
||||
}
|
||||
@if (order.Items.Count > 2)
|
||||
@@ -276,9 +276,9 @@
|
||||
{
|
||||
var firstItem = order.Items.First();
|
||||
<text> - @firstItem.Quantity x @firstItem.ProductName</text>
|
||||
@if (!string.IsNullOrEmpty(firstItem.ProductVariationName))
|
||||
@if (!string.IsNullOrEmpty(firstItem.ProductMultiBuyName))
|
||||
{
|
||||
<span class="text-muted">(@firstItem.ProductVariationName)</span>
|
||||
<span class="text-muted">(@firstItem.ProductMultiBuyName)</span>
|
||||
}
|
||||
@if (order.Items.Count > 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user