Feature: Implement context-aware pricing for product types
Updates pricing logic to use correct price based on product type:
- Updated getEffectivePrice to accept priceType parameter ('base', 'plain', 'personalised')
- Updated toProductDTO to accept and use priceType when computing effective price
- Updated made-to-order pages to use 'personalised' price type
- Updated products catalog pages to use 'plain' price type
- Updated checkout logic to determine price type based on design
Pricing behavior:
- Personalised orders (with design): use personalisedPrice if set, else basePrice
- Plain/blank orders (no design): use plainPrice if set, else basePrice
- Ready-made orders (no design, no plainPrice): use basePrice
All prices now correctly reflect the product variant being purchased.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
e5fb22aab1
commit
5bd6f3de39
@@ -134,7 +134,8 @@
|
||||
"Bash(timeout 30 git push origin main --force)",
|
||||
"Bash(GIT_TRACE=1 git push origin main --force)",
|
||||
"Bash(pkill -f \"node.exe\")",
|
||||
"PowerShell(Stop-Process -Name node -Force -ErrorAction SilentlyContinue)"
|
||||
"PowerShell(Stop-Process -Name node -Force -ErrorAction SilentlyContinue)",
|
||||
"Bash(find \"D:\\\\Craft2Prints\\\\src\\\\app\" -path \"*/\\\\[slug\\\\]/*\" -name \"page.tsx\" | head -10)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user