ver. 0.292: ShopProduct + ShopPaymentMethod + ShopPromotion + ShopStatuses + ShopTransport frontend migration to Domain

Full migration of front\factory\ — entire directory removed (all 20 classes migrated).
ProductRepository +20 frontend methods, PromotionRepository +5 applyType methods,
TransportRepository +4 cached methods, PaymentMethodRepository +cached frontend methods.
Fix: broken transports_list() in ajax.php replaced with forPaymentMethod().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 21:55:16 +01:00
parent 827b903e1e
commit 89d9e61bec
48 changed files with 1780 additions and 975 deletions

View File

@@ -110,9 +110,8 @@ shopPRO/
│ ├── front/ # Klasy frontendu
│ │ ├── Controllers/ # Nowe kontrolery DI (Newsletter, ShopBasket, ShopClient, ShopCoupon, ShopOrder, ShopProducer)
│ │ ├── Views/ # Nowe widoki (Newsletter, Articles, Languages, Banners, Menu, Scontainers, ShopCategory, ShopClient)
│ │ ├── controls/ # Kontrolery legacy (Site, ...)
│ │ ── view/ # Widoki legacy (Site, ...)
│ │ └── factory/ # Fabryki/helpery (fasady)
│ │ ├── controls/ # Kontroler legacy (tylko Site — router)
│ │ ── view/ # Widok legacy (tylko Site — layout engine)
│ └── shop/ # Klasy sklepu
├── docs/ # Dokumentacja techniczna
├── libraries/ # Biblioteki zewnętrzne
@@ -177,7 +176,7 @@ Główna klasa helper (przeniesiona z `class.S.php`) z metodami:
- `\admin\controls\` - kontrolery legacy (fallback)
- `\Domain\` - repozytoria/logika domenowa
- `\admin\factory\` - helpery/fabryki admin
- `\front\factory\` - helpery/fabryki frontend
- ~~`\front\factory\`~~ - USUNIĘTY — wszystkie fabryki zmigrowane do Domain
- `\shop\` - klasy sklepu (Product, Order, itp.)
### Cachowanie produktów
@@ -243,10 +242,9 @@ autoload/
│ └── view/ # Widoki (statyczne - bez zmian)
├── front/
│ ├── Controllers/ # Nowe kontrolery frontendowe (namespace \front\Controllers\) z DI
│ ├── Views/ # Nowe widoki (namespace \front\Views\) — czyste VIEW, statyczne (Menu, Newsletter, Articles, Languages, Banners, Scontainers)
│ ├── controls/ # Legacy kontrolery (fallback)
── factory/ # Legacy helpery (stopniowo migrowane)
│ └── view/ # Legacy widoki
│ ├── Views/ # Nowe widoki (namespace \front\Views\) — czyste VIEW, statyczne (Menu, Newsletter, Articles, Languages, Banners, Scontainers, ShopCategory, ShopClient)
│ ├── controls/ # Legacy kontroler (tylko Site — router)
── view/ # Legacy widok (tylko Site — layout engine)
├── shop/ # Legacy - fasady do Domain
```
@@ -481,5 +479,16 @@ Pelna dokumentacja testow: `TESTING.md`
- UPDATE: `front\view\Site::show()` — przepiecie na `$producerRepo->findForFrontend()`
- UPDATE: `front\controls\Site::getControllerFactories()` — zarejestrowany `ShopProducer`
## Aktualizacja 2026-02-17 (ver. 0.292) - ShopProduct + ShopPaymentMethod + ShopPromotion + ShopStatuses + ShopTransport frontend migration
- **Pelna migracja front\factory\** — USUNIETY caly folder `autoload/front/factory/`; 5 ostatnich klas zmigrowanych:
- `front\factory\ShopProduct` (~410 linii) → `ProductRepository` (~20 nowych metod frontendowych)
- `front\factory\ShopPaymentMethod``PaymentMethodRepository` (metody frontendowe z Redis cache)
- `front\factory\ShopPromotion``PromotionRepository` (5 metod applyType*)
- `front\factory\ShopStatuses` → przepiecie bezposrednio na `ShopStatusRepository`
- `front\factory\ShopTransport``TransportRepository` (4 metody frontendowe z Redis cache)
- Usuniete legacy: `front\controls\class.ShopProduct.php`, `front\view\class.ShopPaymentMethod.php`, `front\view\class.ShopTransport.php`, `shop\class.PaymentMethod.php`
- FIX: broken `transports_list()` w ajax.php → nowa metoda `forPaymentMethod()`
- Pozostale w front\: `controls/class.Site.php` (router), `view/class.Site.php` (layout engine)
---
*Dokument aktualizowany: 2026-02-17 (ver. 0.291)*
*Dokument aktualizowany: 2026-02-17 (ver. 0.292)*