littleshop/LittleShop/Areas/Admin/Controllers
SysAdmin 217de2a5ab Feature: Human-Readable Text Format Product Import
Implemented a new text-based import format for bulk product imports that is
easier to read, write, and version control compared to CSV format.

## New Features

### Import Service (ProductImportService.cs)
- Added `ImportFromHumanTextAsync()` - Main text format parser
- Added `GenerateTemplateAsHumanText()` - Template generator
- Parser supports:
  - Product blocks starting with `#`
  - Descriptions between `<text>` tags (optional)
  - Key-value properties (category, price, weight, unit, stock)
  - Variants (lines starting with `-`)
  - Multi-buy offers (lines starting with `+`)
  - Variant collections (optional, after product name)

### Admin UI
- New controller actions:
  - `ImportText()` - GET: Show import form
  - `ImportText(textContent, file)` - POST: Process import
  - `DownloadTextTemplate()` - Download .txt template
- New view: `ImportText.cshtml`
  - Textarea for pasting text
  - File upload for .txt files
  - Format documentation sidebar
  - Links to CSV import and template downloads
- Updated `Index.cshtml` with dropdown menu for import options

### Template & Documentation
- Created `docs/ProductImportTemplate.txt` with 7 example products
- Demonstrates all format features:
  - Products with/without descriptions
  - Variants with stock levels
  - Multi-buy pricing tiers
  - Multiple weight units

## Text Format Specification

```
# Product Name; OptionalVariantCollection
<text>
Multi-line description (optional)
</text>
category: CategoryName
price: 10.00
weight: 100
unit: Grams
stock: 50

- Variant1; 8.00; 50
- Variant2; 12.00; 30

+ Multi-buy1; 2; 19.00
+ Multi-buy2; 3; 25.00
```

## Benefits
-  Git-friendly (easy to diff and version)
-  Human-readable and editable
-  Supports all product features
-  Multi-line descriptions
-  Clear structure with # delimiters
-  Optional fields (description, variants, multi-buys)
-  Comprehensive error reporting

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 05:29:21 +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 Feature: Human-Readable Text Format Product Import 2025-10-06 05:29:21 +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