prestashop / ps_onepagecheckout
PrestaShop module ps_onepagecheckout
Package info
github.com/PrestaShop/ps_onepagecheckout
Type:prestashop-module
pkg:composer/prestashop/ps_onepagecheckout
Requires
- php: >=8.1
Requires (Dev)
- prestashop/php-dev-tools: ^4.3
- dev-main
- dev-SPE-75/feat/installation-upgrade
- dev-dependabot/npm_and_yarn/views/dev/webpack-cli-7.0.2
- dev-dependabot/npm_and_yarn/views/dev/babel/preset-env-7.29.2
- dev-dependabot/npm_and_yarn/views/dev/terser-webpack-plugin-5.4.0
- dev-dependabot/npm_and_yarn/views/dev/babel-loader-10.1.1
- dev-dependabot/composer/dev/prestashop/php-dev-tools-approx-5
- dev-dev
This package is not auto-updated.
Last update: 2026-03-21 08:00:37 UTC
README
About
ps_onepagecheckout is the native PrestaShop module that provides the one-page checkout experience.
Warning
This module is under heavy development. It is not production-ready and should not be used in live environments.
Compatibility
PrestaShop: 9.0.0 or later.
What the module owns
- checkout process injection through
actionCheckoutBuildProcess, - front office AJAX endpoints for guest initialization and address form refresh,
- back office configuration for enabling or disabling one-page checkout,
- checkout layout configuration assets and templates shipped by the module,
- checkout runtime flag exposure for the order page.
Code map
ps_onepagecheckout.php: module entry point, hook registration, runtime wiring.src/Checkout: checkout process, availability checks, AJAX handlers.src/Form: back office configuration form and checkout form helpers.controllers/front: FO endpoints used by the one-page checkout runtime.controllers/admin: BO entry point for module configuration.views/js: checkout client-side behavior.views/templates: BO templates and module-owned checkout assets.tests/php: unit and integration coverage for the module.
Contributing
Before opening a PR:
- Regenerate the module autoload when PHP classes move or are added.
- Rebuild front assets when changing files under
views/js, and commit the generated bundles fromviews/public(including.LICENSE.txtfiles). - Run the relevant PHP tests for the area you touched.
- Use the decision log and implementation rules as the source of truth for sensitive changes.
Local development
PHP autoload
From the repository root:
composer dump-autoload -d
Front assets
From ps_onepagecheckout/views:
npm install # Development: rebuild assets on every change under views/js npm run watch # Production build: generate bundles consumed by the module npm run build
When you change any file under views/js:
- run
npm run buildto regenerate:views/public/opc-guest-init.bundle.jsviews/public/opc-address.bundle.js- their corresponding
*.LICENSE.txtfiles,
- and commit both the source changes and the updated files in
views/public.
The CI workflow
js.ymlrunsnpm run buildto ensure the assets remain buildable, and the sharedbuild-releaseworkflow packages the module using the files present in the repository (including the generated bundles).
Testing
PHP test configuration lives in tests/php:
- unit suite:
modules/ps_onepagecheckout/tests/php/phpunit.xml - integration suite:
modules/ps_onepagecheckout/tests/php/phpunit-integration.xml - static analysis helpers:
modules/ps_onepagecheckout/tests/php/phpstan.sh
Run PHPUnit in the same isolated Docker environment locally and in GitHub Actions:
./scripts/run-tests.sh unit ./scripts/run-tests.sh integration
The runner expects a prepared PrestaShop checkout in ../prestashop by default.
Override it with PS_ROOT_DIR_HOST=/path/to/prestashop when needed.
Integration tests provision MySQL automatically inside Docker.
For end-to-end checks, use the dedicated runbook:
Project references
- implementation rules:
docs/RULES.md - architectural decisions:
docs/DECISIONS.md - contributors:
CONTRIBUTORS.md
License
This module is released under the Academic Free License 3.0.