How to make Extension as Template in Hybris

1.Change in extensioninfo.xml file 

First add the property below in the extensioninfo.xml after core tag of  the extension which you want to use as a template.

Eg. We want to make electronicstore as template. Add he below property in extensioninfo.xml of  electronicstore.

<meta key=”extgen-template-extension” value=”true”/>


2. Create an extgen.properties file .

Create  a blank file named as extgen.properties parallel to project.properties file in your extension.

We will create an extgen.properties file in electronic store 

3. Modify extgen.properties file .

Modify extgen.properties file with below properties :

YEXTNAME_TOKEN=electronicsstore
YMODULE_TOKEN=electronic
YMODULE_PACKAGE_ROOT=store
YMODULE_CLASS_PREFIX=store
YPACKAGE_TOKEN=de.hybris.platform.electronicsstore
YMANAGER_TOKEN=ElectronicsstoreManager
YCLASSPREFIX_TOKEN=Electronicsstore
YGENERATED_TOKEN=Generated

4. Do Ant extgen .

Go to your platform directory .
Type setantenv.bat 
Type ant extgen .
You will see your extension in templates.

Post a Comment