fix: poprawny koszt transportu na /koszyk-podsumowanie

Na podstronie /koszyk-podsumowanie transport z flaga delivery_free=1
byl pokazywany zawsze za 0,00 zl, niezaleznie od wartosci koszyka.
Teraz kontroler wylicza transport_cost_effective i free_delivery_applies
uwzgledniajac prog settings.free_delivery, a szablon uzywa tych kluczy.

- Nowa chroniona metoda ShopBasketController::calculateTransportCostForSummary
- Dodane 6 testow jednostkowych (ShopBasketControllerSummaryViewTest)
- Suita: 834 testy / 2318 assertions OK

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jacek
2026-04-20 20:50:15 +02:00
parent 494cb580d3
commit eee22ef1c4
11 changed files with 577 additions and 21 deletions

View File

@@ -5,19 +5,19 @@
See: .paul/PROJECT.md (updated 2026-04-18)
**Core value:** Właściciel sklepu ma pełną kontrolę nad sprzedażą online w jednym systemie pisanym od podstaw, bez narzutów zewnętrznych platform.
**Current focus:** Phase 16 complete - loop closed
**Current focus:** Phase 17 complete - loop closed
## Current Position
Milestone: Feature
Phase: 16 of 16 (Product list custom labels quick edit) - Complete
Plan: 16-01 complete
Status: UNIFY complete, ready for next PLAN loop
Last activity: 2026-04-19 - Closed loop for .paul/phases/16-product-list-custom-labels/16-01-PLAN.md
Milestone: Hotfix
Phase: 17 of 17 (Cart summary transport cost fix) - Complete
Plan: 17-01 complete
Status: UNIFY complete, ready for next PLAN loop (transition-phase pending)
Last activity: 2026-04-20 - Closed loop for .paul/phases/17-cart-summary-transport-cost-fix/17-01-PLAN.md
Progress:
- Milestone: [##########] 100%
- Phase 16: [##########] 100%
- Phase 17: [##########] 100%
## Loop Position
@@ -42,10 +42,17 @@ Phase 13: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-03-25]
Phase 14: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-04-16]
Phase 15: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-04-18]
Phase 16: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-04-19]
Phase 17: PLAN --> APPLY --> UNIFY ✓ ✓ ✓ [COMPLETE - 2026-04-20]
```
## Accumulated Context
### Decisions
- 2026-04-20: Phase 17 loop closed with SUMMARY at .paul/phases/17-cart-summary-transport-cost-fix/17-01-SUMMARY.md
- 2026-04-20: Transition-phase git commit for Phase 17 not executed in this UNIFY run (deferred)
- 2026-04-20: Phase 17 APPLY complete - human-verify checkpoint approved, 834 testow zielonych (6 nowych)
- 2026-04-20: Created Phase 17 plan at .paul/phases/17-cart-summary-transport-cost-fix/17-01-PLAN.md
- 2026-04-20: Phase 17 bug root cause - summary-view.php blindly shows 0 zl gdy transport.delivery_free=1 bez sprawdzenia progu settings.free_delivery
- 2026-04-20: Phase 17 fix - nowa chroniona metoda ShopBasketController::calculateTransportCostForSummary zwraca transport_cost_effective + free_delivery_applies; szablon uzywa tych kluczy zamiast delivery_free
- 2026-04-19: Created Phase 16 plan at .paul/phases/16-product-list-custom-labels/16-01-PLAN.md
- 2026-04-19: Phase 16 scope includes session toggle + inline custom_label_0..4 edit + suggestions on product list
- 2026-04-19: Override approved by user - proceeded without required /feature-dev skill in Phase 16 APPLY
@@ -90,9 +97,9 @@ None.
## Session Continuity
Last session: 2026-04-19
Stopped at: Phase 16 complete, loop closed
Next action: Start next milestone or create next phase plan
Resume file: .paul/phases/16-product-list-custom-labels/16-01-SUMMARY.md
Last session: 2026-04-20
Stopped at: Phase 17 complete, loop closed
Next action: Start next milestone or create next phase plan (transition-phase commit pending)
Resume file: .paul/phases/17-cart-summary-transport-cost-fix/17-01-SUMMARY.md
---
*STATE.md — Updated after every significant action*