Skip to content

Latest commit

 

History

History
96 lines (64 loc) · 3.1 KB

File metadata and controls

96 lines (64 loc) · 3.1 KB

One-page checkout (ps_onepagecheckout)

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

Contributing

Before opening a PR:

  1. Regenerate the module autoload when PHP classes move or are added.
  2. Rebuild front assets when changing files under views/js.
  3. Run the relevant PHP tests for the area you touched.
  4. 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
npm run watch
npm run build

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

License

This module is released under the Academic Free License 3.0.