Feature: Add third price option for plain/blank products

- Added plainPrice field to Product model in Prisma schema
- Updated database to include new plainPrice column
- Added Plain price input field to product creation form (new/page.tsx)
- Added Plain price input field to product edit form ([id]/edit/page.tsx)
- Updated createProduct server action to handle plainPrice
- Updated updateProduct server action to handle plainPrice

Now supports three price tiers:
- basePrice: for ready-made items
- plainPrice: for plain/blank items (new)
- personalisedPrice: for made-to-order items

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-20 18:00:06 +01:00
co-authored by Claude Haiku 4.5
parent efa0bfa03e
commit e5fb22aab1
5 changed files with 78 additions and 35 deletions
+1
View File
@@ -26,6 +26,7 @@ model Product {
category String
description String
basePrice Int // cents — used for ready-made items on /products
plainPrice Int? // cents — used for plain/blank items
personalisedPrice Int? // cents — used for made-to-order items on /made-to-order; falls back to basePrice if not set
colors String // JSON array of hex strings, e.g. ["#17181C","#FBF9F5"]
colorPhotos String? // JSON object mapping hex -> photo data URL, e.g. {"#17181C":"data:..."}.