Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34916b2dad | ||
|
|
6fa48129f8 | ||
|
|
4b3208f824 | ||
|
|
7d0e4558ab |
@@ -70,7 +70,11 @@
|
|||||||
"mcp__serena__find_referencing_symbols",
|
"mcp__serena__find_referencing_symbols",
|
||||||
"Bash(cd C:\\\\visual studio code\\\\projekty\\\\shopPRO:*)",
|
"Bash(cd C:\\\\visual studio code\\\\projekty\\\\shopPRO:*)",
|
||||||
"Bash(cd \"/c/visual studio code/projekty/shopPRO\" && rm -rf temp/temp_317 && powershell -ExecutionPolicy Bypass -File build-update.ps1 -FromTag v0.316 -ToTag v0.317 -ChangelogEntry \"FIX - klucz API: fix zapisu \\(brakowalo w whiteliście\\), przycisk Generuj losowy klucz, ulepszony routing API\" 2>&1)",
|
"Bash(cd \"/c/visual studio code/projekty/shopPRO\" && rm -rf temp/temp_317 && powershell -ExecutionPolicy Bypass -File build-update.ps1 -FromTag v0.316 -ToTag v0.317 -ChangelogEntry \"FIX - klucz API: fix zapisu \\(brakowalo w whiteliście\\), przycisk Generuj losowy klucz, ulepszony routing API\" 2>&1)",
|
||||||
"Bash(./test.ps1)"
|
"Bash(./test.ps1)",
|
||||||
|
"mcp__serena__read_memory",
|
||||||
|
"Bash(mysql -h host117523.hostido.net.pl -u host117523_shoppro -pmhA9WCEXEnRfTtbN33hL host117523_shoppro -e \"SELECT pattern, destination FROM pp_routes WHERE destination LIKE ''%product%'' OR destination LIKE ''%category%'' LIMIT 20;\")",
|
||||||
|
"Bash(/c/xampp/php/php.exe -r \":*)",
|
||||||
|
"Bash(/c/xampp/php/php.exe phpunit.phar --configuration phpunit.xml)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -102,7 +102,6 @@ Custom autoloader in each entry point (not Composer autoload at runtime). Tries
|
|||||||
- `\Domain\` → `autoload/Domain/` (uppercase D)
|
- `\Domain\` → `autoload/Domain/` (uppercase D)
|
||||||
- `\admin\Controllers\` → `autoload/admin/Controllers/` (lowercase a)
|
- `\admin\Controllers\` → `autoload/admin/Controllers/` (lowercase a)
|
||||||
- `\Shared\` → `autoload/Shared/`
|
- `\Shared\` → `autoload/Shared/`
|
||||||
- `\front\` → `autoload/front/`
|
|
||||||
- `\api\` → `autoload/api/`
|
- `\api\` → `autoload/api/`
|
||||||
- Do NOT use `\Admin\` (uppercase A) — the server directory is `admin/` (lowercase)
|
- Do NOT use `\Admin\` (uppercase A) — the server directory is `admin/` (lowercase)
|
||||||
- `\shop\` namespace is **deleted** — all 12 legacy classes migrated to `\Domain\`, `autoload/shop/` directory removed
|
- `\shop\` namespace is **deleted** — all 12 legacy classes migrated to `\Domain\`, `autoload/shop/` directory removed
|
||||||
@@ -211,6 +210,8 @@ When user says **"KONIEC PRACY"**, execute in order:
|
|||||||
3. SQL migrations (if DB changes): place in `migrations/{version}.sql` (e.g. `migrations/0.304.sql`). **NOT** in `updates/` — build script reads from `migrations/` automatically
|
3. SQL migrations (if DB changes): place in `migrations/{version}.sql` (e.g. `migrations/0.304.sql`). **NOT** in `updates/` — build script reads from `migrations/` automatically
|
||||||
4. Commit
|
4. Commit
|
||||||
5. Push
|
5. Push
|
||||||
|
6. Build update package: `git tag v0.XXX && powershell.exe -ExecutionPolicy Bypass -File build-update.ps1 -FromTag v0.PREV -ToTag v0.XXX -ChangelogEntry "opis"` — skrypt automatycznie aktualizuje `versions.php`
|
||||||
|
7. Commit i push plików paczki (`updates/0.30/ver_0.XXX.zip`, `ver_0.XXX_manifest.json`, `updates/versions.php`, `updates/changelog-data.html`)
|
||||||
|
|
||||||
Before starting implementation, review current state of docs (see AGENTS.md for full list).
|
Before starting implementation, review current state of docs (see AGENTS.md for full list).
|
||||||
|
|
||||||
@@ -225,3 +226,5 @@ Before starting implementation, review current state of docs (see AGENTS.md for
|
|||||||
- `docs/UPDATE_INSTRUCTIONS.md` — how to build client update packages
|
- `docs/UPDATE_INSTRUCTIONS.md` — how to build client update packages
|
||||||
|
|
||||||
## Za każdym razem jak próbujesz sprawdzić jakiś plik z logami spróbuj go najpierw pobrać z serwera FTP
|
## Za każdym razem jak próbujesz sprawdzić jakiś plik z logami spróbuj go najpierw pobrać z serwera FTP
|
||||||
|
|
||||||
|
## Wszystkie pliki które tworzysz jako pomocnicze, np build_0330.ps1 czy build-update.ps1 twórz w folderze temp
|
||||||
BIN
autoload/.DS_Store
vendored
BIN
autoload/.DS_Store
vendored
Binary file not shown.
@@ -654,6 +654,10 @@ class ProductRepository
|
|||||||
'custom_label_2' => $product['custom_label_2'],
|
'custom_label_2' => $product['custom_label_2'],
|
||||||
'custom_label_3' => $product['custom_label_3'],
|
'custom_label_3' => $product['custom_label_3'],
|
||||||
'custom_label_4' => $product['custom_label_4'],
|
'custom_label_4' => $product['custom_label_4'],
|
||||||
|
'new_to_date' => $product['new_to_date'],
|
||||||
|
'additional_message' => (int)($product['additional_message'] ?? 0),
|
||||||
|
'additional_message_required' => (int)($product['additional_message_required'] ?? 0),
|
||||||
|
'additional_message_text' => $product['additional_message_text'],
|
||||||
'set_id' => $product['set_id'] !== null ? (int)$product['set_id'] : null,
|
'set_id' => $product['set_id'] !== null ? (int)$product['set_id'] : null,
|
||||||
'product_unit_id' => $product['product_unit_id'] !== null ? (int)$product['product_unit_id'] : null,
|
'product_unit_id' => $product['product_unit_id'] !== null ? (int)$product['product_unit_id'] : null,
|
||||||
'producer_id' => $product['producer_id'] !== null ? (int)$product['producer_id'] : null,
|
'producer_id' => $product['producer_id'] !== null ? (int)$product['producer_id'] : null,
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ class ProductsApiController
|
|||||||
// String fields — direct mapping
|
// String fields — direct mapping
|
||||||
$stringFields = [
|
$stringFields = [
|
||||||
'sku', 'ean', 'custom_label_0', 'custom_label_1', 'custom_label_2',
|
'sku', 'ean', 'custom_label_0', 'custom_label_1', 'custom_label_2',
|
||||||
'custom_label_3', 'custom_label_4', 'wp',
|
'custom_label_3', 'custom_label_4', 'wp', 'new_to_date', 'additional_message_text',
|
||||||
];
|
];
|
||||||
foreach ($stringFields as $field) {
|
foreach ($stringFields as $field) {
|
||||||
if (isset($body[$field])) {
|
if (isset($body[$field])) {
|
||||||
@@ -447,6 +447,18 @@ class ProductsApiController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($body['additional_message'])) {
|
||||||
|
$d['additional_message'] = !empty($body['additional_message']) ? 'on' : '';
|
||||||
|
} elseif ($existing !== null) {
|
||||||
|
$d['additional_message'] = !empty($existing['additional_message']) ? 'on' : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($body['additional_message_required'])) {
|
||||||
|
$d['additional_message_required'] = !empty($body['additional_message_required']) ? 'on' : '';
|
||||||
|
} elseif ($existing !== null) {
|
||||||
|
$d['additional_message_required'] = !empty($existing['additional_message_required']) ? 'on' : '';
|
||||||
|
}
|
||||||
|
|
||||||
// Foreign keys
|
// Foreign keys
|
||||||
if (isset($body['set_id'])) {
|
if (isset($body['set_id'])) {
|
||||||
$d['set'] = $body['set_id'];
|
$d['set'] = $body['set_id'];
|
||||||
|
|||||||
BIN
autoload/front/.DS_Store
vendored
BIN
autoload/front/.DS_Store
vendored
Binary file not shown.
13
docs/API.md
13
docs/API.md
@@ -216,6 +216,10 @@ Odpowiedz:
|
|||||||
"weight": 0.5,
|
"weight": 0.5,
|
||||||
"stock_0_buy": 0,
|
"stock_0_buy": 0,
|
||||||
"custom_label_0": null,
|
"custom_label_0": null,
|
||||||
|
"new_to_date": null,
|
||||||
|
"additional_message": 0,
|
||||||
|
"additional_message_required": 0,
|
||||||
|
"additional_message_text": null,
|
||||||
"set_id": null,
|
"set_id": null,
|
||||||
"product_unit_id": 1,
|
"product_unit_id": 1,
|
||||||
"producer_id": 3,
|
"producer_id": 3,
|
||||||
@@ -294,6 +298,10 @@ Content-Type: application/json
|
|||||||
"status": 1,
|
"status": 1,
|
||||||
"sku": "PROD-001",
|
"sku": "PROD-001",
|
||||||
"ean": "5901234123457",
|
"ean": "5901234123457",
|
||||||
|
"new_to_date": null,
|
||||||
|
"additional_message": 0,
|
||||||
|
"additional_message_required": 0,
|
||||||
|
"additional_message_text": null,
|
||||||
"weight": 0.5,
|
"weight": 0.5,
|
||||||
"languages": {
|
"languages": {
|
||||||
"pl": {
|
"pl": {
|
||||||
@@ -330,6 +338,10 @@ Content-Type: application/json
|
|||||||
{
|
{
|
||||||
"price_brutto": 129.99,
|
"price_brutto": 129.99,
|
||||||
"status": 1,
|
"status": 1,
|
||||||
|
"new_to_date": "2026-12-31",
|
||||||
|
"additional_message": 1,
|
||||||
|
"additional_message_required": 0,
|
||||||
|
"additional_message_text": "Dodaj tresc do personalizacji",
|
||||||
"languages": {
|
"languages": {
|
||||||
"pl": {
|
"pl": {
|
||||||
"name": "Zaktualizowana nazwa"
|
"name": "Zaktualizowana nazwa"
|
||||||
@@ -339,6 +351,7 @@ Content-Type: application/json
|
|||||||
```
|
```
|
||||||
|
|
||||||
Partial update — wystarczy przeslac tylko zmienione pola. Pola nieprzeslane zachowuja aktualna wartosc.
|
Partial update — wystarczy przeslac tylko zmienione pola. Pola nieprzeslane zachowuja aktualna wartosc.
|
||||||
|
Pola ustawien produktu obslugiwane przez API: `new_to_date`, `additional_message`, `additional_message_required`, `additional_message_text`.
|
||||||
|
|
||||||
Odpowiedz: pelne dane produktu (jak w `get`).
|
Odpowiedz: pelne dane produktu (jak w `get`).
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,14 @@ Logi zmian z migracji na Domain-Driven Architecture. Najnowsze na gorze.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## ver. 0.332 (2026-03-01) - API produktów: nowe pola new_to_date i additional_message
|
||||||
|
|
||||||
|
- **NEW**: `ProductRepository::getProductForApi()` — eksportuje 4 nowe pola: `new_to_date`, `additional_message` (int 0/1), `additional_message_required` (int 0/1), `additional_message_text`
|
||||||
|
- **NEW**: `ProductsApiController` — obsługa nowych pól w PUT/PATCH (aktualizacja `new_to_date`, `additional_message`, `additional_message_required`, `additional_message_text`)
|
||||||
|
- **DOCS**: `docs/API.md` — zaktualizowane przykłady GET/PUT dla nowych pól produktu
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## ver. 0.331 (2026-03-01) - Bugfix: strona produktu używała layoutu kategorii zamiast domyślnego
|
## ver. 0.331 (2026-03-01) - Bugfix: strona produktu używała layoutu kategorii zamiast domyślnego
|
||||||
|
|
||||||
- **FIX**: `LayoutsRepository::getProductLayout()` — fallback gdy produkt i jego kategorie nie mają przypisanego layoutu zmieniany z `categories_default = 1` na `status = 1`; wcześniej produkty bez layoutu pobierały szablon "Podstrony - kategorie" zamiast właściwego domyślnego
|
- **FIX**: `LayoutsRepository::getProductLayout()` — fallback gdy produkt i jego kategorie nie mają przypisanego layoutu zmieniany z `categories_default = 1` na `status = 1`; wcześniej produkty bez layoutu pobierały szablon "Podstrony - kategorie" zamiast właściwego domyślnego
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ composer test # standard
|
|||||||
## Aktualny stan
|
## Aktualny stan
|
||||||
|
|
||||||
```text
|
```text
|
||||||
OK (805 tests, 2253 assertions)
|
OK (807 tests, 2258 assertions)
|
||||||
```
|
```
|
||||||
|
|
||||||
Zweryfikowano: 2026-02-24 (ver. 0.318)
|
Zweryfikowano: 2026-03-01 (ver. 0.332)
|
||||||
|
|
||||||
## Konfiguracja
|
## Konfiguracja
|
||||||
|
|
||||||
|
|||||||
BIN
updates/0.30/ver_0.330.zip
Normal file
BIN
updates/0.30/ver_0.330.zip
Normal file
Binary file not shown.
23
updates/0.30/ver_0.330_manifest.json
Normal file
23
updates/0.30/ver_0.330_manifest.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"changelog": "REFACT - eliminacja htaccess.conf; Helpers::htacces() generuje .htaccess w calosci z PHP; 32 statyczne trasy systemowe w pp_routes (type='system'); dynamiczne trasy jezykowe i producentow w pp_routes; invalidacja cache Redis pp_routes:all po htacces()",
|
||||||
|
"version": "0.330",
|
||||||
|
"files": {
|
||||||
|
"added": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"deleted": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"modified": [
|
||||||
|
"index.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"checksum_zip": "sha256:7e55f52c8d66a38231d3c19b65e70d1201af7a7fef0bfe69b1967fccae798bec",
|
||||||
|
"sql": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"date": "2026-02-27",
|
||||||
|
"directories_deleted": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
updates/0.30/ver_0.331.zip
Normal file
BIN
updates/0.30/ver_0.331.zip
Normal file
Binary file not shown.
23
updates/0.30/ver_0.331_manifest.json
Normal file
23
updates/0.30/ver_0.331_manifest.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"changelog": "FIX - getProductLayout: fallback categories_default zmieniony na status (produkty bez layoutu pobieraly szablon kategorii zamiast domyslnego)",
|
||||||
|
"version": "0.331",
|
||||||
|
"files": {
|
||||||
|
"added": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"deleted": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"modified": [
|
||||||
|
"autoload/Domain/Layouts/LayoutsRepository.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"checksum_zip": "sha256:c5246fe62ee19ccdc0424b2836cb18543ef20aa4449eda295a358c6022583ed5",
|
||||||
|
"sql": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"date": "2026-03-01",
|
||||||
|
"directories_deleted": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
<?
|
<?
|
||||||
$current_ver = 329;
|
$current_ver = 331;
|
||||||
|
|
||||||
for ($i = 1; $i <= $current_ver; $i++)
|
for ($i = 1; $i <= $current_ver; $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user