Skip to content

Feat: migrate Core OPC to native module#18

Open
ThbPS wants to merge 94 commits into
mainfrom
SPE-72/opc-migration
Open

Feat: migrate Core OPC to native module#18
ThbPS wants to merge 94 commits into
mainfrom
SPE-72/opc-migration

Conversation

@ThbPS
Copy link
Copy Markdown
Collaborator

@ThbPS ThbPS commented Mar 26, 2026

Questions Answers
Description? This PR migrates the latest One Page Checkout changes implemented in Core OPC into the native module. It centralizes OPC JS events and shared selectors, reorganizes AJAX checkout handlers by domain, and keeps the module aligned with Core behavior without changing public routes or JSON contracts.
Type? improvement / refacto
BC breaks? no
Deprecations? no
Fixed ticket? N/A.
How to test? Verify checkout behaviors are unchanged: address refresh, carrier refresh, payment refresh, guest init, final submit, and address modal flows.

@github-project-automation github-project-automation Bot moved this to Ready for review in PR Dashboard Mar 26, 2026
ThbPS and others added 5 commits March 26, 2026 17:06
- Add segmentio/analytics-php dependency and PHP bootstrap (Segment::init)
- Bootstrap from BO configuration context when module is enabled
- Add Segment documentation and adjust tests accordingly
Comment thread src/Checkout/CheckoutOnePageStep.php
julienr114 and others added 7 commits April 8, 2026 15:28
… rule

phpstan-strict-rules flags bare array-access expressions whose result is
discarded. Replace $arr['key']; with $arr->offsetGet('key'); — method
calls are not subject to the same rule while still forcing CartLazyArray
to eagerly compute tax-sensitive properties.
…-lazy-array

fix: eager-evaluate tax-sensitive cart properties before temp address cleanup
Move Segment PHP write key out of the repository by reading it from PS_OPC_SEGMENT_WRITE_KEY.

This prevents local/preprod environments from sending events to the production Segment source when the prod key is not present.
Read Segment write keys from environment variables and select the correct one using APP_ENV.

- APP_ENV=prod|production -> SEGMENT_PROD_KEY
- otherwise -> SEGMENT_PREPROD_KEY
dylanDenizonPresta and others added 13 commits April 9, 2026 17:02
Use _PS_MODE_DEV_ to select which Segment write key to load from env.

- _PS_MODE_DEV_=true  -> SEGMENT_PREPROD_KEY
- _PS_MODE_DEV_=false -> SEGMENT_PROD_KEY

Also stop tracking .env and provide .env.dist template.
…cher-sync

fix(opc): SPE-110 sync pay button amount on voucher changes
- add gift wrapping support
- make submit validation state survive reloads and failed submit roundtrips
- harden address, carrier, payment and guest flows in the frontend
Introduce Analytics::trackEvent() which bootstraps Segment lazily and tracks events in best-effort mode.

Remove Segment bootstrap from hookActionAdminControllerSetMedia so analytics init no longer depends on a PrestaShop hook.
Update docs and unit tests accordingly.
L3RAZ and others added 30 commits May 19, 2026 14:28
[SPE-129] Imported needed templates from hummingbird and replaced includes with…
[SPE-133] Adds OPC submit event
[SPE-134] Added payment_html comparison
[SPE-115] - Problème d'affichage et sauvegarde des champs de la modale
Include the changes from PrestaShopCorp/hummingbirdFork#43 in the module-owned OPC address templates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

8 participants