@tower_74/cms-plugin-commerce
v0.5.1
Published
Front-end of the Base CMS commerce plugin (ADR-0026): storefront, cart, checkout + product/order admin pages. Ships source; exports a CmsPlugin.
Readme
tower_74/cms-plugin-commerce
The Commerce plugin for the Base CMS (ADR-0026): products + variants, storefront, cart,
tax/shipping, Stripe checkout + webhook (source of truth), and order admin with emails +
invoices. Extracted from base-cms's in-repo Modules/Commerce into a standalone, installable
plugin — drop nwidart, register through the plugin SDK, enable/disable via the Plugins dashboard.
One repo = a Composer package (PHP) + an npm source package (front end), like the other packages.
Status
Migration in progress (Phase 2):
- [x] PHP copied + renamespaced
Modules\Commerce\→Tower74\CmsPluginCommerce\ - [x] provider rewritten off nwidart → plugin SDK (
CommercePlugin, lifecycle,isEnabled('commerce')) - [x] Orchestra Testbench harness + the commerce test suites (
make test— 67 green) - [ ] front end (pages/components) moved out of
cms-app - [ ] base-cms switchover + catalogue entry + releases
Testing
make test (or php -d memory_limit=2G vendor/bin/pest) boots cms-core + the commerce
provider in an Orchestra Testbench app and runs the plugin's own suites — no base-cms
checkout required. The harness (tests/TestCase.php) supplies the app glue base-cms
normally provides (settings config + migration, the Inertia root view, a UserFactory, the
web middleware stack, and the super-admin gate bypass).
Layout
src/ # PHP (PSR-4 Tower74\CmsPluginCommerce\)
Models/ Services/ Payments/ Http/ Console/ Events/ Listeners/ Mail/ Settings/ Support/
Providers/CommerceServiceProvider.php # auto-discovered
database/{migrations,factories,seeders}
config/config.php # commerce.* (tax, shipping, currency, Stripe)
routes/{web,api}.php
ui/ # npm package source (added during the front-end move)License
Proprietary. Distributed for use by Base CMS sites.
