Commit Graph

197 Commits

Author SHA1 Message Date
fdc4cac593 ver. 0.311: fix race condition Apilo + persistence filtrów + poprawki cen
- Fix: race condition callback płatności przed wysłaniem do Apilo
- Fix: processApiloSyncQueue czeka na apilo_order_id zamiast usuwać task
- Fix: drugie wywołanie processApiloSyncQueue po wysyłce zamówień w cronie
- Fix: ceny w szczegółach zamówienia (effective price zamiast 0 zł)
- New: persistence filtrów tabel admin (localStorage)
- Testy: 760 tests, 2141 assertions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.311
2026-02-23 10:50:34 +01:00
8f67d9de0a build: update package v0.310
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:57:20 +01:00
3ae0bc95e0 ver. 0.310: logi integracji w panelu admin
Nowa zakladka "Logi" w sekcji Integracje - podglad tabeli pp_log
z paginacja, sortowaniem, filtrami i rozwijalnym kontekstem JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.310
2026-02-23 09:54:09 +01:00
92ec5e1194 build: update package v0.309
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 09:32:51 +01:00
4de5479c41 ver. 0.309: ApiloLogger + cache-busting CSS/JS + poprawki UI
- ApiloLogger: logowanie operacji Apilo do pp_log z kontekstem JSON
- Cache-busting: ?ver=filemtime() dla CSS i JS w admin main-layout
- Fix: inicjalizacja $mdb przed SettingsRepository w admin/index.php
- Fix: rzutowanie (string) w ShopProductController::escapeHtml()
- UI: text-overflow ellipsis dla kategorii produktow + title tooltip
- JS: navigator.clipboard API w copyToClipboard() z fallbackiem
- CSS: uproszczenie .site-content, usuniecie .with-menu
- Migracja: pp_log + kolumny action, order_id, context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.309
2026-02-23 09:31:28 +01:00
f31630b69c build: update package v0.308
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:01:37 +01:00
efcf06969c ver. 0.308: kolory statusow zamowien + poprawki bezpieczenstwa
- Kolorowe badge statusow na liscie zamowien (pp_shop_statuses.color)
- Walidacja hex koloru z DB (regex), sanityzacja HTML transport
- Polaczenie 2 zapytan SQL w jedno orderStatusData()
- Path-based form submit w table-list.php (admin URL routing)
- 11 nowych testow (750 total, 2114 assertions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.308
2026-02-22 20:57:56 +01:00
56c931f7da Add remote database host and update migration SQL
- Added a new remote host configuration to config.php for database connection.
- Updated migration script to ensure proper addition of 'min_order_amount' column in pp_shop_payment_methods table.
- Created .gitignore file to exclude cache directory.
- Added project configuration file for Serena with initial settings and tool configurations.
2026-02-22 18:06:15 +01:00
54edbd21f6 build: update package v0.307
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:04:02 +01:00
708a941f13 ver. 0.307: check-update button + auto-generated changelog
- Add "Sprawdź aktualizacje" refresh button in admin sidebar (AJAX check without page reload)
- Add UpdateController::checkUpdate() action clearing session cache and querying update server
- Replace hand-edited changelog.php with auto-generating script (reads manifests + legacy JSON)
- Migrate all legacy changelog entries (0.300-0.001) to changelog-legacy.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.307
2026-02-22 18:01:12 +01:00
0b1f289478 build: rebuild update packages v0.304, v0.305 with fixed .updateignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:16:26 +01:00
82a655a6af build: update package v0.306
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:13:01 +01:00
f16f5ce8f8 ver. 0.306: hide transport methods with no available payment methods
When all payment methods for a transport are filtered out by
min_order_amount/max_order_amount limits, the transport is now hidden
from the basket. Prevents showing delivery options with empty payment
method lists (e.g. "Kurier - płatność przy odbiorze" when COD exceeds
max amount).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.306
2026-02-22 17:09:38 +01:00
2dc1360395 remove ver_0.304_sql.txt from updates/ — SQL lives only in migrations/
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:50:29 +01:00
5c1842181a fix: UTF-8 BOM in update SQL files causing MariaDB syntax error
PowerShell 5.1 Out-File -Encoding UTF8 adds BOM (EF BB BF) which
breaks SQL execution on production. Also fix manifest JSON serializing
full PS objects instead of plain strings.

- build-update.ps1: use UTF8Encoding($false) for all file writes
- build-update.ps1: force .ToString() on Get-Content results
- UpdateRepository.php: strip BOM and normalize line endings in executeSql
- Rebuild ver_0.304 package files (clean SQL + manifest)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:49:23 +01:00
62255541ab build: update packages v0.304, v0.305
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:39:20 +01:00
ec77160130 ver. 0.305: Fix permutation attribute sorting + free delivery progress bar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.305
2026-02-22 16:33:30 +01:00
562495f120 build: update package v0.304
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.304
2026-02-22 15:28:19 +01:00
9de4afec9a ver. 0.304: Configurable payment method order amount limits
Replace hardcoded PayPo condition (id=6, 40-1000 PLN) with generic
min/max order amount columns on pp_shop_payment_methods. Admin form
fields added, frontend basket checkout filters dynamically. Cache
invalidation on save. 4 new tests (734 total, 2080 assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:26:51 +01:00
3a3c2adb47 build: update package v0.303
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:05:19 +01:00
db7c881d36 ver. 0.303: Fix attribute display collision + product preview button
Fix: product attributes with the same sort order value were overwriting
each other in getProductAttributes(), causing only one attribute to
display on the frontend. Now uses usort() with sequential keys.

New: Preview button in product edit form opens product page in new tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.303
2026-02-22 15:04:51 +01:00
1fc36e4403 ver. 0.302: REST API product variants, attributes dictionary, attribute filtering
- Add variant CRUD endpoints (variants, create_variant, update_variant, delete_variant)
- Add dictionaries/attributes endpoint with multilingual names and values
- Add attribute_* filter params for product list filtering by attribute values
- Enrich product detail attributes with translated names (attribute_names, value_names)
- Include variants array in product detail response for parent products
- Add price_brutto validation on product create
- Batch-load attribute/value translations (4 queries instead of N+1)
- Add 43 new unit tests (730 total, 2066 assertions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.302
2026-02-22 14:42:52 +01:00
c0cdaaf638 build: update package v0.301
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:58:59 +01:00
f2b2629d49 ver. 0.301: Collapsible table filters and mobile-responsive order details
- Table filters hidden by default with toggle button (icon + active count badge)
- Filter state persisted in localStorage; auto-show when filters active
- Order details mobile layout: icon-only action bar, full-width stacking,
  compact product list (image + name + qty x price = total), bottom-sheet
  dropdown for integrations menu

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.301
2026-02-22 13:53:43 +01:00
b409806f02 ver. 0.300: Manifest-based update system with checksum verification and file backup
Replaces the manual ZIP packaging workflow with an automated build script.
UpdateRepository now supports both manifest JSON format (new) and legacy
_sql.txt/_files.txt format (fallback), enabling a smooth transition for
existing client instances.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.300
2026-02-21 23:30:58 +01:00
d2e85e94df ver. 0.299: Table column visibility toggle with localStorage persistence
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.299
2026-02-21 22:00:22 +01:00
5eee2c6649 Refactor code structure for improved readability and maintainability 2026-02-21 21:48:03 +01:00
ebab220f7e ver. 0.297: REST API products endpoint — list, get, create, update
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 22:39:48 +01:00
9cac0d1eeb ver. 0.296: REST API for ordersPRO — orders management, dictionaries, API key auth
- 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>
2026-02-19 20:25:07 +01:00
21efe28464 ver. 0.295: Admin order product editing — add/remove/modify products, AJAX search, stock adjustment
- Order product CRUD in admin panel (add, delete, edit quantity/prices)
- AJAX product search endpoint for order edit form
- Automatic stock adjustment when editing order products
- Transport cost recalculation based on free delivery threshold
- Fix: promo price = 0 when equal to base price (no real promotion)
- Clean up stale temp/ build artifacts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 19:30:38 +01:00
de11afb003 ver. 0.294: Code review complete — 96/96 classes, 27 fixes across all layers
Full codebase review of autoload/ directory (96 classes, ~1144 methods).
Fixes: null safety (query/find guards), redundant DI bypass, undefined
variables, missing globals, and Imagick WebP mime type bug in Helpers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:26:07 +01:00
0252ccea30 Dodaj punkty do listy zadań w pliku TODO 2026-02-19 12:32:45 +01:00
054b1b4a34 ver. 0.293: Code review fixes — 6 repositories, 16 fixes
- ArticleRepository: SQL injection fix (addslashes→parameterized), DRY refactor topArticles/newsListArticles
- AttributeRepository: dead class_exists('\S') blocking cache/temp clear
- CategoryRepository: dead class_exists('\S') blocking SEO link generation (critical)
- BannerRepository: parameterize $today in SQL + null guard on query()
- BasketCalculator: null guard checkProductQuantityInStock + optional DI params
- PromotionRepository: null guard on $basket (production fatal)
- OrderRepository/ShopBasketController/ajax.php: explicit DI in BasketCalculator callers

614 tests, 1821 assertions (+4 new)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 01:07:39 +01:00
29821bccf2 Refactor code structure for improved readability and maintainability 2026-02-18 08:28:02 +01:00
99d78abea9 Add new files for shop classes in version 0.294
- Introduced class files for Basket, Category, Coupon, Order, Product, ProductAttribute, ProductCustomField, ProductSet, Promotion, Search, Shop, and Transport.
2026-02-18 02:09:08 +01:00
1283846b39 Fix update package: consolidate versions 0.292-0.294 into ver. 0.292
- Move ZIP to updates/0.20/ver_0.292.zip (correct location)
- Add ver_0.292_files.txt (12 deleted shop classes)
- Consolidate changelog entries (0.292+0.293+0.294 → single 0.292)
- Set versions.php $current_ver = 292

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 02:08:30 +01:00
69e78ca248 ver. 0.294: Remove all 12 legacy autoload/shop/ classes (~2363 lines)
Complete Domain-Driven Architecture migration:
- Phase 1-4: Transport, ProductSet, Coupon, Shop, Search, Basket,
  ProductCustomField, Category, ProductAttribute, Promotion
- Phase 5: Order (~562 lines) + Product (~952 lines)
- ~20 Product methods migrated to ProductRepository
- Apilo sync migrated to OrderAdminService
- Production hotfixes: stale Redis cache (prices 0.00), unqualified
  Product:: refs in LayoutEngine, object->array template conversion
- AttributeRepository::getAttributeValueById() Redis cache added

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 02:05:39 +01:00
22530df501 Add docs/MEMORY.md with project memory and reference it in CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:51:06 +01:00
b73c84d16d Add CLAUDE.md with project guidance for Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:43:40 +01:00
6559281ebc Add new files for ShopCoupon, ShopOrder, and ShopProducer functionality
- Created new PHP classes for handling shop coupons and orders in the autoload front controls and factories.
- Added a new view class for ShopOrder.
- Introduced a new ShopProducerController and Producer class for managing producers.
- Included version 0.291 zip file with the necessary updates and new files.
2026-02-17 23:01:02 +01:00
d2444500e9 ver. 0.293: front\controls\Site + front\view\Site → front\App + front\LayoutEngine
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:21:44 +01:00
89d9e61bec 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>
2026-02-17 21:55:16 +01:00
827b903e1e ver. 0.291: ShopProducer frontend migration to Domain + Controllers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 20:32:07 +01:00
46ff934d42 ver. 0.290: ShopCoupon + ShopOrder frontend migration to Domain + Controllers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 19:54:21 +01:00
c06f055cf5 Implement feature X to enhance user experience and optimize performance 2026-02-17 10:56:18 +01:00
d29d396197 ver. 0.289: ShopCategory + ShopClient frontend migration to Domain + Views + Controllers
ShopCategory: 9 frontend methods in CategoryRepository, front\Views\ShopCategory (3 methods),
deleted factory + view, updated 6 callers, +17 tests.

ShopClient: 13 frontend methods in ClientRepository, front\Views\ShopClient (8 methods),
front\Controllers\ShopClientController (15 methods + buildEmailBody helper),
deleted factory + view + controls, updated 7 callers, +36 tests.

Security fix: removed hardcoded password bypass 'Legia1916'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:41:40 +01:00
437d4c78dc ver. 0.288: BasketCalculator + ShopBasketController migration, cms\Layout removal
- Migrate front\factory\ShopBasket → Domain\Basket\BasketCalculator (4 static methods, 18 callers updated)
- Migrate front\controls\ShopBasket → front\Controllers\ShopBasketController (camelCase, instance methods)
- Add snake_case→camelCase action dispatch for new controllers in Site::route()
- Update title()/page_title() to check front\Controllers\ before fallback
- Remove cms\Layout class (replaced by $layoutsRepo->find())
- Add 8 tests for BasketCalculator (484 tests, 1528 assertions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:38:45 +01:00
3b50ba7990 ver. 0.287: Scontainers + ShopAttribute frontend migration to Domain
- Scontainers: frontScontainerDetails() with Redis cache in ScontainersRepository
- Scontainers: new front\Views\Scontainers VIEW, deleted factory + view legacy
- ShopAttribute: frontAttributeDetails(), frontValueDetails() with Redis cache in AttributeRepository
- ShopAttribute: clearFrontCache() per attribute/value + language
- ShopAttribute: deleted front\factory\ShopAttribute, updated 4 callers
- Tests: 476 OK, 1512 assertions (+6 frontend tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 08:47:21 +01:00
8162df7356 ver. 0.286: Layouts, Menu, Pages frontend migration to Domain
- Add 6 frontend methods to LayoutsRepository (Redis cache, 3-level fallback)
- Add 6 frontend methods to PagesRepository (Redis cache, recursive pages)
- Create front\Views\Menu (clean VIEW replacing front\view\Menu)
- Delete front\factory\Layouts, Menu, Pages + front\view\Menu + dead submenu.php
- Fix null $lang_id TypeError in check_url_params() (remove string type hint + ?? '')
- Optimize Helpers::htacces() from 3 layout calls to 1
- Tests: 470 OK, 1484 assertions (+16 new)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 08:21:53 +01:00
920e65abd5 Implement feature X to enhance user experience and fix bug Y in module Z 2026-02-17 00:16:21 +01:00