littleshop/LittleShop/Services
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
..
AuthService.cs 🔒 SECURITY: Emergency fixes and hardening 2025-09-22 05:45:49 +01:00
BotActivityService.cs Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
BotContactService.cs Implement comprehensive notification system for LittleShop 2025-09-19 16:17:24 +01:00
BotMetricsService.cs Add customer communication system 2025-08-27 18:02:39 +01:00
BotService.cs Add customer communication system 2025-08-27 18:02:39 +01:00
CategoryService.cs Fix: Categories Edit IsActive checkbox now works both ways 2025-10-03 13:48:56 +01:00
ConfigurationValidationService.cs Feature: Add elegant PWA loading screen 2025-10-02 16:39:47 +01:00
CryptoPaymentService.cs Fix SilverPay payment integration JSON serialization 2025-09-22 04:38:28 +01:00
CustomerMessageService.cs Implement bidirectional customer conversations with customer-based grouping and order tagging 2025-08-27 19:18:46 +01:00
CustomerService.cs Add customer communication system 2025-08-27 18:02:39 +01:00
DataSeederService.cs BTCPay-infrastructure-recovery 2025-09-04 21:28:47 +01:00
IAuthService.cs BTCPay-infrastructure-recovery 2025-09-04 21:28:47 +01:00
IBotActivityService.cs Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
IBotMetricsService.cs Add customer communication system 2025-08-27 18:02:39 +01:00
IBotService.cs Add customer communication system 2025-08-27 18:02:39 +01:00
ICategoryService.cs Implement complete e-commerce functionality with shipping and order management 2025-08-20 17:37:24 +01:00
ICryptoPaymentService.cs Remove BTCPay completely, integrate SilverPAY only, configure TeleBot with real token 2025-09-20 19:22:29 +01:00
ICustomerMessageService.cs Implement bidirectional customer conversations with customer-based grouping and order tagging 2025-08-27 19:18:46 +01:00
ICustomerService.cs Add customer communication system 2025-08-27 18:02:39 +01:00
IOrderService.cs Implement product variations, enhanced order workflow, mobile responsiveness, and product import system 2025-09-18 01:39:31 +01:00
IProductService.cs Implement product multi-buys and variants system 2025-09-21 00:30:12 +01:00
IPushNotificationService.cs WebPush-and-photo-upload-fixes 2025-09-01 06:01:05 +01:00
ISilverPayService.cs 🔒 SECURITY: Emergency fixes and hardening 2025-09-22 05:45:49 +01:00
ISystemSettingsService.cs 🔒 SECURITY: Emergency fixes and hardening 2025-09-22 05:45:49 +01:00
ITeleBotMessagingService.cs Implement comprehensive notification system for LittleShop 2025-09-19 16:17:24 +01:00
ITelegramBotManagerService.cs Add customer communication system 2025-08-27 18:02:39 +01:00
IVariantCollectionService.cs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00
MessageDeliveryService.cs Implement comprehensive notification system for LittleShop 2025-09-19 16:17:24 +01:00
OrderService.cs Fix: Delete order now works for Customer-based orders 2025-10-06 04:56:32 +01:00
ProductImportService.cs Feature: Human-Readable Text Format Product Import 2025-10-06 05:29:21 +01:00
ProductService.cs Fix: Complete workaround for EF Core 9 + SQLite GUID parameter bug - load all variants then filter in-memory 2025-10-05 17:01:52 +01:00
PushNotificationService.cs BTCPay-infrastructure-recovery 2025-09-04 21:28:47 +01:00
ReviewService.cs Initial commit of LittleShop project (excluding large archives) 2025-09-17 15:07:38 +01:00
RoyalMailService.cs "Royal-Mail-shipping-integration-and-test-improvements" 2025-09-08 03:53:28 +01:00
ShippingRateService.cs Implement complete e-commerce functionality with shipping and order management 2025-08-20 17:37:24 +01:00
SilverPayService.cs Fix SilverPay payment creation - use fiat_amount instead of amount 2025-09-24 21:08:16 +01:00
SystemSettingsService.cs 🔒 SECURITY: Emergency fixes and hardening 2025-09-22 05:45:49 +01:00
TeleBotMessagingService.cs Implement comprehensive notification system for LittleShop 2025-09-19 16:17:24 +01:00
TelegramBotManagerService.cs "Fix-security-and-config-from-TestAgent" 2025-08-27 22:41:18 +01:00
VariantCollectionService.cs Add variant collections system and enhance ProductVariant with weight/stock tracking 2025-09-28 17:03:09 +01:00