Files
newwalls.pl/.paul/ROADMAP.md
Jacek Pyziak ac03f807c1 feat(02-product-actions-fixes): Phase 02 complete — customization, price label, structure fix
Plan 02-03: Customization save + success modal (5/5 AC)
- 26-field squaremeter POST payload (verbose PL dim, qty_alt/qty_alth)
- Chain POST /module/ps_shoppingcart/ajax -> Bootstrap #blockcart-modal
- Critical fix: moved {/block} so inline script actually renders
- __p02p02InFlight re-entrancy guard

Plan 02-04: Live cena per-sqm label obok "Dodaj do koszyka" (5/5 AC)
- .p02p04-total-price label, gorna .current-price static
- Separate __p02p04Bound + setInterval reconciliation
- Poll-retry prestashop.on registration

Plan 02-05: Struktura materialu w POST payload (4/4 AC)
- Enumerate [name^="group["] spoza formy, doklej do payload
- Fix: group_5 select w .product-bar-box nie trafial do koszyka

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 00:55:05 +02:00

49 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ROADMAP.md
## Milestone v0.1 — Naprawa funkcji w nowym layoucie strony produktu
Status: **Ready to ship** — Phase 1 ✓, Phase 2 ✓ COMPLETE (02-01/02/03/04/05, 2026-04-24). Milestone UAT / IP gate removal pending.
Cel: przywrócić pełną funkcjonalność strony produktu w nowym wyglądzie (IP 89.69.31.86) bez naruszania starego.
### Phase 01 — Product variants (wariant kolorystyczny) — **✅ Complete (2026-04-23)**
- Wizualnie: blok `.product-variants` w `.product-box.product-variants-data` wyglada jak `d:\temp\Frame 33.png` / Figma 27:9867 (3 kafelki z obrazem + podpis pod spodem, responsive 2×1 < 768 px). ✓
- Funkcjonalnie: kliknięcie miniatury zmienia wariant produktu — AJAX `action=refresh` + in-place DOM update (obraz + cena + URL przez `history.pushState`), bez reloadu. ✓
- Dotyczy tylko gałęzi `REMOTE_ADDR == '89.69.31.86'` w `product.tpl` oraz scope'owanego CSS/JS. Stary layout nietknięty.
- Summary: `.paul/phases/01-product-variants-fix/01-01-SUMMARY.md`
### Phase 02 — Product actions fixes (piece + add-to-cart + customization + modal) — **✅ Complete (2026-04-24)**
Plan 02-01 (**✅ Complete**): Konfigurator „piece" (crop + odbicie lustrzane) w nowym layoucie — port funkcjonalności ze starego layoutu z identycznym kontraktem DOM. Drag + mirror + re-init po AJAX refresh. ✓
- Summary: `.paul/phases/02-product-actions-fixes/02-01-SUMMARY.md`
Plan 02-02 (**PARTIAL — closed 2026-04-23**): Add-to-cart submission działa (POST → cart saves item). Core infrastructure: capture-phase native handler w custom.js + inline mirror w product.tpl, idempotency guard, blockcart refresh. Customization + modal delegowane do 02-03.
- Summary: `.paul/phases/02-product-actions-fixes/02-02-SUMMARY.md`
- Uwaga: Plan 02-03 ujawnił że inline mirror z 02-02 nigdy nie renderował (Smarty `{extends}` block inheritance). AC-3 z 02-02 pass było przez custom.js alone; 02-03 przeniósł `{/block}` co definitywnie fix'uje mirror flow.
Plan 02-03 (**✅ Complete 2026-04-24**): Customization save + success modal. 5/5 AC pass via live Playwright verification.
- Ground truth: Playwright capture 26-field OLD payload (verbose PL dim format, `qty_alt`/`qty_alth` osobno od `qty`, `product_total_price_calc` = int base × area).
- sq fields injection w POST do `/pl/koszyk`.
- Chain POST do `/module/ps_shoppingcart/ajax` → Bootstrap `#blockcart-modal` render z "Kontynuuj zakupy" + "Przejdź do kasy".
- Bug fix: `{/block}` move (inline script was dead code), `__p02p02InFlight` re-entrancy guard (double POST), basePrice fallback przez meta tag.
- Summary: `.paul/phases/02-product-actions-fixes/02-03-SUMMARY.md`
Plan 02-04 (**✅ Complete 2026-04-24**): Live cena per-sqm labelka obok "Dodaj do koszyka" w nowym layoucie. 5/5 AC pass via Playwright.
- Scope pivot mid-task: label `.p02p04-total-price` obok buttona zamiast nadpisywania `.current-price` (user request). Górna "Od 239,00 zł / m²" zostaje statyczna.
- Reaktywność: piece dim changes (native input events), variant AJAX refresh (prestashop.on z poll-retry rejestracji).
- Separate `__p02p04Bound` guard + synchronous IIFE init + `setInterval` reconciliation (late-override protection).
- Summary: `.paul/phases/02-product-actions-fixes/02-04-SUMMARY.md`
Plan 02-05 (**✅ Complete 2026-04-24**): Struktura materiału w POST payload (production bug fix). 4/4 AC pass via Playwright network capture.
- Diagnoza: `<select id="group_5" name="group[5]">` (Tekstura materiału) POZA formą `#add-to-cart-or-refresh` w `.product-bar-box``$form.serialize()` nie łapie → PS saves default structure (id=9 Canvas) zamiast wybranej.
- Fix: enumeracja `[name^="group["]` spoza formy, encodeURIComponent + doklej do payload. Future-proof dla kolejnych attribute groups.
- Weryfikacja: Playwright network capture `group%5B5%5D=16` w payload, `id_product_attribute=4175` (new combination), `/pl/koszyk` pokazuje "Extra fine".
- Summary: `.paul/phases/02-product-actions-fixes/02-05-SUMMARY.md`
### Deferred (nice-to-have, nie blockers):
- **Plan 02-06** — Systemowy cache-buster `?v=<mtime>` dla `<script src=custom.js>` (inline mirror wycofać z Plan 02-02/02-03/02-04/02-05).
- **Plan 02-07** — Puste bloki `.product-protect`, `.product-installation`, `.product-order-sample`.
- Opcjonalny add-on — resize handles bezpośrednio na `#piece`.
**Milestone v0.1 ready na finalizację** — IP gate `REMOTE_ADDR == '89.69.31.86'` może zostać usunięty po UAT.