Na podstronie /koszyk-podsumowanie transport z flaga delivery_free=1
byl pokazywany zawsze za 0,00 zl, niezaleznie od wartosci koszyka.
Teraz kontroler wylicza transport_cost_effective i free_delivery_applies
uwzgledniajac prog settings.free_delivery, a szablon uzywa tych kluczy.
- Nowa chroniona metoda ShopBasketController::calculateTransportCostForSummary
- Dodane 6 testow jednostkowych (ShopBasketControllerSummaryViewTest)
- Suita: 834 testy / 2318 assertions OK
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds session-based show/hide toggle for custom labels in admin product list, inline editable fields for custom_label_0..4, and label suggestions with custom entry support. Includes repository/controller updates, UI fixes, tests, and PAUL docs release updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes static container admin edit flow by preserving id in hiddenFields and adding route-id fallback during save.
Adds regression tests for edit/create id behavior, updates release docs (changelog/testing/CLAUDE), and appends SonarQube open issues to docs/TODO.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dodano hidden marker custom_field_name_present w formularzu edycji produktu.
Zmieniono warunek w ProductRepository z array_key_exists('custom_field_name')
na array_key_exists('custom_field_name_present') — jQuery .serialize() pomijał
klucz pustej tablicy gdy wszystkie pola usunięte. Test jednostkowy dodany.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Usunięty błędny guard w summaryView() blokujący kolejne zamówienia
- Token zamówienia z jednorazowego na TTL 30 min (multi-tab safe)
- Logowanie błędów zamówień do logs/logs-order-YYYY-MM-DD.log
- Redirect przy złym tokenie na /koszyk-podsumowanie zamiast /koszyk
- Double-submit guard przeniesiony przed sprawdzenie tokena
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Naprawione eventy purchase, begin_checkout, view_item, add_to_cart
do formatu GA4 (item_id/item_name zamiast id/name, currency PLN,
google_business_vertical, poprawne typy danych).
Dodany nowy event view_cart na stronie koszyka.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Nowa metoda basketUpdateCustomFields() w ShopBasketController — AJAX endpoint
z walidacją required fields, przeliczaniem product_code (MD5 hash) i merge
duplikatów. UI: przycisk "Edytuj personalizację" + formularz inline + JS.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ProductRepository: kopiowanie custom fields uwzględnia pola type i is_required.
product-custom-fields.php: ochrona XSS, obsługa pola image, fallback typu na text.
SonarQube 0.343: nowe issues dodane do TODO.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Email notyfikacji zawiera numer zamówienia, klienta, datę, kwotę
- Order joby (send_order, sync_payment, sync_status) ponawiane w nieskończoność co 30 min
- Rozróżnienie PONAWIANY vs TRWAŁY BŁĄD w emailu
- Cleanup stuck jobów po udanym wysłaniu zamówienia
- +2 testy infinite retry w CronJobRepositoryTest
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Get-Content bez -Encoding UTF8 psuło polskie znaki przy każdym buildzie,
powodując wykładnicze powiększanie pliku. Zamieniono na ReadAllText(UTF8).
Plik changelog-data.html wygenerowany od nowa z docs/CHANGELOG.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Regresja z ver. 0.339 (split IntegrationsRepository → ApiloRepository):
$apiloRepository nie było w use() 5 handlerów cron.php.
Dodano retry zamówień z apilo_order_id=-1 co 1h.
Dodano powiadomienia mailowe o błędach sync Apilo.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fatal Error: Call to undefined method stdClass::is_one_time() w OrderRepository:793.
Zamieniono wywołania nieistniejących metod na stdClass na dostęp do właściwości
+ istniejącą metodę CouponRepository::markAsUsed().
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
IntegrationsRepository zredukowany z ~875 do ~340 linii.
Nowa klasa ApiloRepository przejmuje 19 metod apilo*.
Konsumenci (IntegrationsController, OrderAdminService, cron.php) zaktualizowani przez DI.
Suite: 818 testów, 2275 asercji.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- summaryView(): guard — redirect do istniejacego zamowienia gdy ORDER_SUBMIT_LAST_ORDER_ID w sesji
- basketSave(): try-catch wokol createFromBasket(), wyjatki logowane, koszyk zachowany
- OrderRepository: usunieto hardkodowane payment_id == 3, uzywana flaga is_cod
- PaymentMethodRepository: nowe pole is_cod w normalizacji, save() i forTransport() SQL
- ShopPaymentMethodController: switch "Platnosc przy odbiorze" w formularzu edycji
- migrations/0.338.sql: ALTER TABLE pp_shop_payment_methods ADD COLUMN is_cod
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Nowa klasa \Shared\Security\CsrfToken (generate/validate/regenerate)
- Token CSRF we wszystkich formularzach edycji (form-edit.php)
- Walidacja CSRF w FormRequestHandler::handleSubmit()
- Token CSRF w formularzu logowania i formularzach 2FA
- Walidacja CSRF w App::special_actions() dla żądań POST
- Regeneracja tokenu po udanym logowaniu (bezpośrednia i przez 2FA)
- Fix XSS: htmlspecialchars na $alert w unlogged-layout.php
- 7 nowych testów CsrfTokenTest (817 testów łącznie)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- cron.php: przywrocono E_WARNING i E_DEPRECATED (wyciszono tylko E_NOTICE i E_STRICT)
- IntegrationsRepository: try-catch po zapisie tokenow Apilo - blad DB nie sklada false po cichu
- ProductRepository/ArticleRepository: error_log gdy safeUnlink wykryje sciezke poza upload/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>