This commit is contained in:
2026-03-21 00:04:12 +01:00
parent ec51757e2e
commit 3cef4c8247
11 changed files with 615 additions and 26 deletions

51
changelog/2026-03.md Normal file
View File

@@ -0,0 +1,51 @@
# Changelog 2026-03
## 2026-03-20
### Zmiany funkcjonalne
- Podmieniono logikę modułu `ps_categoryproducts` na wyświetlanie produktów z tej samej cechy `Seria` (`id_feature = 8`) zamiast produktów z tej samej kategorii, gdy produkt ma ustawioną cechę serii.
- Dla produktów z serią włączono tryb restrykcyjny: brak fallbacku do kategorii, jeśli nie ma dopasowań po serii.
- Dodano i dopracowano karuzelę dla sekcji produktów powiązanych (nawigacja, responsywność, scroll poziomy).
- Zmieniono nagłówek sekcji na: `Produkty z tej samej serii`.
### Najważniejsze modyfikacje w kodzie
1. `modules/ps_categoryproducts/ps_categoryproducts.php`
- Stała cechy serii:
- `SERIES_FEATURE_ID = 8` ([modules/ps_categoryproducts/ps_categoryproducts.php:44](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\ps_categoryproducts.php:44))
- Główna logika danych widgetu:
- pobieranie wszystkich wartości serii i filtrowanie po nich ([modules/ps_categoryproducts/ps_categoryproducts.php:213](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\ps_categoryproducts.php:213))
- Rejestracja assetów karuzeli (z fallbackiem):
- `registerCarouselAssets()` ([modules/ps_categoryproducts/ps_categoryproducts.php:287](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\ps_categoryproducts.php:287))
- Pobieranie wartości serii produktu:
- `getSeriesFeatureValueIds()` ([modules/ps_categoryproducts/ps_categoryproducts.php:381](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\ps_categoryproducts.php:381))
- Pobieranie produktów z tej samej serii:
- `getProductsByFeatureValue()` ([modules/ps_categoryproducts/ps_categoryproducts.php:398](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\ps_categoryproducts.php:398))
- Wersjonowanie cache bloku:
- `v4_strict_series_masterdb` ([modules/ps_categoryproducts/ps_categoryproducts.php:490](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\ps_categoryproducts.php:490))
2. `themes/InterBlue/modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl`
- Nagłówek sekcji dla serii:
- `Produkty z tej samej serii` ([themes/InterBlue/modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:42](c:\visual studio code\projekty\interblue.pl\themes\InterBlue\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:42))
- Markup karuzeli i klasy JS:
- wrapper i nawigacja ([themes/InterBlue/modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:39](c:\visual studio code\projekty\interblue.pl\themes\InterBlue\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:39), [themes/InterBlue/modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:54](c:\visual studio code\projekty\interblue.pl\themes\InterBlue\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:54), [themes/InterBlue/modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:66](c:\visual studio code\projekty\interblue.pl\themes\InterBlue\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:66))
- Inline CSS/JS opakowany w `{literal}`:
- style ([themes/InterBlue/modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:25](c:\visual studio code\projekty\interblue.pl\themes\InterBlue\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:25))
- skrypt ([themes/InterBlue/modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:73](c:\visual studio code\projekty\interblue.pl\themes\InterBlue\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:73))
3. `modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl`
- Analogiczne zmiany jak w override motywu:
- `{literal}` + markup karuzeli + JS ([modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:25](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:25), [modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:39](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:39), [modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl:77](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\views\templates\hook\ps_categoryproducts.tpl:77))
4. Dodatkowe pliki assetów karuzeli
- CSS:
- [modules/ps_categoryproducts/views/css/carousel.css](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\views\css\carousel.css)
- JS:
- [modules/ps_categoryproducts/views/js/carousel.js](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\views\js\carousel.js)
- Zabezpieczenie katalogów:
- [modules/ps_categoryproducts/views/css/index.php](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\views\css\index.php)
- [modules/ps_categoryproducts/views/js/index.php](c:\visual studio code\projekty\interblue.pl\modules\ps_categoryproducts\views\js\index.php)
### Uwagi operacyjne
- Po wdrożeniu zmian wymagane było czyszczenie cache PrestaShop, aby wymusić przebudowę bloku `ps_categoryproducts`.