Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Extending the shop

The extension points of the Exponential shop in one place - shipping, VAT, basket info, shop account, confirm order and exchange rate handlers, payment gateways, price datatypes and workflow events - with how each is…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/e-commerce/extending/README.md

On this page

Extending the shop

This part is for developers who need the shop to do something it does not do out of the box. The Exponential shop is built around replaceable handlers: a setting names a handler, the kernel finds its file by a naming convention and calls it in place of its own. Everything on these pages goes into an extension of your own, never into kernel/.

Contents

  1. All extension points
  2. The handler pattern
  3. Packaging
  4. Testing an extension of the shop

All extension points

Extension pointSelected byFile in your extensionPage
Shipping handlershop.ini [ShippingSettings] Handler, ExtensionDirectories[]shippinghandlers/<name>shippinghandler.phpCustom shipping handler
VAT handlershop.ini [VATSettings] Handler, ExtensionDirectories[]vathandlers/<name>vathandler.phpCustom VAT handler
Payment gatewayan active extension, or paymentgateways.iniclasses/<extension>gateway.phpPayment gateway development
Shop account handlershopaccount.ini [AccountSettings] Handler, [HandlerSettings] ExtensionRepositories[]shopaccounthandlers/<name>shopaccounthandler.phpShop account handlers
Basket info handlershop.ini [BasketInfoSettings] Handler, ExtensionDirectories[]basketinfohandlers/<name>basketinfohandler.phpBasket info and confirm order handlers
Confirm order handlershopaccount.ini [ConfirmOrderSettings] Handlerconfirmorderhandlers/<name>confirmorderhandler.phpsame
Exchange rates handlershop.ini [ExchangeRatesSettings] ExchangeRatesUpdateHandler, ExtensionDirectories[]exchangeratehandlers/<name>/<name>handler.phpExchange rate handlers
Price datatypesite.ini [ShopSettings] ProductDatatypeStringList[]datatypes/<name>/<name>type.phpCustom price datatypes
Workflow eventworkflow.ini [EventSettings]workflowtypes/event/<name>/<name>type.phpWorkflows on shop triggers

The handler pattern

  1. A setting names the handler, for example Handler=mystore.
  2. The kernel searches the repository directories and the listed extensions for <name><suffix>.php.
  3. It includes the file and instantiates <name><Suffix>, for example mystoreShippingHandler (PHP class names are not case sensitive, so MyStoreShippingHandler works too).
  4. If the file is missing, an error is written to the debug log and the kernel falls back or does nothing; it does not stop the request. Check the log after every change.

The RAD tool Setup > RAD has a handler wizard (setup/handlerextension/<kind>) with recipes for payment gateways, VAT, shipping, basket info and exchange rate handlers; it writes the class, the setting and an extension around them (Extensions). A payment gateway made by the wizard is written to extension/<name>/paymentgateways/<alias>/classes/<alias>gateway.php, the path the gateway loader reads through paymentgateways.ini [PaymentGatewaySettings] GatewaysDirectories[]. A gateway generated before 6.0.15 sits one level higher and is not loaded: move it as the RAD extension points note explains.

Packaging

  • One extension per store or per integration, for example mystore_shop, with its own settings/*.ini.append.php (Packaging as an extension).
  • Regenerate autoloads after adding classes (php bin/php/ezpgenerateautoloads.php -e) and check that every class loads (php bin/php/checkclasses.php --quiet-ok).
  • Keep provider credentials out of the extension: read them from settings/override/ (Environment settings and secrets).
  • If the extension is useful to others, consider contributing it back.

Testing an extension of the shop

  • Unit tests for calculations (shipping, VAT) without a database: DB-less PHPUnit tests.
  • A full test order for each path the extension changes: Testing a store.
  • The Store dashboard's "How your shop works" after deployment: it names the handlers and workflows in effect.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x