Commerce Cloud contains lots of business logic or code, which provides the several eCommerce solutions. These logic are separated into a package according to its use. These packages are called Extension:
In Commerce Cloud an extension can contain business logic, type definitions, a web application or a Management Console Configuration. In simple words, the programming that we add to the basic package is called an extension.
Command : extgen
- it contains only small letters.
- contains no space
Example : following are some extensions:
- voucher extension: provides voucher and coupon functions
- payment extension: provides payment related code base
- saporder extension: provides SAP order integration
- solrfacetsearch extension: provides Solr search engine for search functionality
Basic Structure of extension:
Lets take an example of one extension:
acceleratorservices: folder structure is given below
I will explain here some important packages which are mostly being used in development.
This folder in extensions are basically used for all kind of configurations.
3 basic configuration files:
Tips: These 3 files are always being present in every extensions. In the further chapter we will explain the structure and use of it.
This folder always contain the business logic or code .It means we can found all the java files of related extensions in this folder
3. project.properties :
This file contains all the properties which can be used in the project related to its extensions. You can also add custom properties by yourself. We will explain this in further lesson.
here you can write test classes : unit test, integration test etc.
in this xml file we setup dependencies of other extension. For setting dependencies of other extensions in your extensions we use requires-extension tag.
Example : <requires-extension name=”cms2″/>
Here we can store libraries like .zar file , which can be used in your implementation:
Example : in acceleratorservices extensions we use following .zar and you can find these .zar files in lib folder.