- New API layer: ApiRouter, OrdersApiController, DictionariesApiController
- Orders API: list (with filters/pagination/updated_since), details, change status, set paid/unpaid
- Dictionaries API: order statuses, transport methods, payment methods
- X-Api-Key authentication via pp_settings.api_key
- OrderRepository: listForApi(), findForApi(), touchUpdatedAt()
- updated_at column on pp_shop_orders for polling support
- api.php: skip session for API requests, route to ApiRouter
- SettingsController: api_key field in system tab
- 30 new tests (666 total, 1930 assertions)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add cached frontend methods to existing Domain repositories (allSettings, getSingleValue, defaultLanguage, activeLanguages, translations)
- Convert front\factory\Settings and Languages to facades delegating to Domain repositories
- Fix get_single_settings_value() - was hardcoded to 'firm_name', now uses $param correctly
- Add CacheHandler stub methods (get/set/exists) to test bootstrap
- Establish architectural rule: Domain classes are shared between admin and frontend
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move article save/delete logic from monolithic factory to ArticleRepository
with DI-based controller actions, following the established refactoring pattern.
- ArticleRepository: add save() with 9 private helpers, archive() method
- ArticlesController: add save() and delete() actions with DI
- Factory methods delegate to repository (backward compatibility)
- Router: add article_save/article_delete action mappings
- Old controls methods marked @deprecated
- 59 tests, 123 assertions passing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Introduced new `SettingsRepository` and `CacheRepository` classes in the `autoload\Domain` namespace.
- Updated `SettingsController` in the `admin\Controllers` namespace to enhance settings management.
- Added new templates for settings in `admin\templates\settings` and `admin\templates\site`.
- Improved overall structure and organization of settings-related files.