prestashop/ps_onepagecheckout 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

prestashop/ps_onepagecheckout

Composer 安装命令:

composer require prestashop/ps_onepagecheckout

包简介

PrestaShop module ps_onepagecheckout

README 文档

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

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, and commit the generated bundles from views/public (including .LICENSE.txt files).
  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

# 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 build to regenerate:
    • views/public/opc-guest-init.bundle.js
    • views/public/opc-address.bundle.js
    • their corresponding *.LICENSE.txt files,
  • and commit both the source changes and the updated files in views/public.

The CI workflow js.yml runs npm run build to ensure the assets remain buildable, and the shared build-release workflow 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

License

This module is released under the Academic Free License 3.0.

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: AFL-3.0
  • 更新时间: 2026-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固