Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Extending the Platform

Extending the Platform

Developers have full access to the Commerce Engine source code to customize and extend all aspects to meet their needs. However, by making modifications directly in the source code, managing customizations can become difficult as the Commerce Engine evolves over time. Once you upgrade to a new version of the Commerce Engine, your customized code may conflict with upgraded source code and cause problems with your platform. Therefore, we recommend following the binary-based development process, where your customizations live in separate projects from the out-of-the-box Elastic Path source code.

To get you working in a binary-based development environment, Elastic Path provides extension projects for your customizations to live in. Having your customizations in these extension projects makes it easier for you to upgrade your Elastic Path source code when the time comes.

We find binary-based development also:

  • Reduces the time and cost of upgrades - You do not need to merge changes at the source code level.
  • Accelerates development - You do not need to build the entire code base. You only need to build your customizations.
  • Improves the ability to leverage Maven features - such as dependency management and plugins.

This page explains how the extension projects are set up for binary based development while the child pages dive in to the details of how you can make different kinds of extensions.

Extensions

Inside the extensions directory, you should see the following projects:

mockup_extensions-layout

Each project extends a different component of the Commerce Engine. These projects depend on their equivalent out-of-the-box component, so the ext-core project depends on the ep-core project and the ext-search project depends on the ep-search project. By depending on the equivalent out-of-the-box component, any customizations you put in these projects can import or inherit from that component's out-of-the-box classes, which enables you to change behavior.

Core library

The extension core project refers to the out-of-the-box Commerce Engine core library as a dependency and contains the classes and resources that customize core functionality.

The other extension projects have a dependency on the extension core project, so any changes you make in the extension core project are visible to the other projects. Commerce Manager Client plugins also depend on the core library extension and can see changes made in the extension core project.

For information on the structure of the extension core project, see Core Extension Project Structure. war overlay - sf and core.png

Web applications

Each Commerce Engine web application has two components: a JAR component and a WAR component. When you build the extension web application project, both the JAR and WAR components combine together into a single web application that can be deployed to a server.

Like the out-of-the-box web applications, you can start these webapps in a Tomcat container by running:

mvn tomcat7:run-war

For information on the structure of the extension webapp projects, see Webapp Extension Project Structure.

Database

The extension database project contains a liquibase changelog where you can customize the database schema by adding liquibase changesets. For more information on how you can use Liquibase to extend the database schema, see Schema and Data Modifications in Liquibase.

Assets

The extension assets project contains the images and velocity templates used by your stores and cmclient. For information on how to manage your assets, see Managing Assets.

Osgi-wrappers

The osgi-wrappers project contains the wiring required to have the Commerce Manager Client depend on the extension core library project. To use your customizations in the Commerce Manager Client, see Referencing new or modified core services with the Commerce Manager Client.

Import Export Tool

The importexport project extends the ep-importexport and ep-importexport-cli projects and is used when you want to customize importexport functionality.

Data Sync Tool

Similar to the importexport project, the sync project extends the ep-sync and ep-sync-cli projects and is used to customize data sync tool functionality.