Extension:

An extension is a file containing programming that serves to extend the capabilities of a more basic program. In hybris an extension can contain business logic, type definitions, a web application, or a Hybris Management Console configuration. In simple words, the programming that we add to the basic program is called an extension.

Creating an extension in Hybris:

 

Step 1:

Open the hybris directory and type CMD in the folder path to open the command prompt using files path.

Extensions in Hybris

Step 2:

Run the command “setantenv.bat”.

Extensions in Hybris

 

Step 3:

Run the command “ant extgen” in the command prompt and press enter.

Extensions in Hybris

Step 4:

It will ask you for the extension name and type any name as the extension name and press enter. (Here in this case “MYEXTENSION” is the name of the extension ).

Extensions in Hybris

Step 5:

Then you will get a BUILD SUCCESS message. You will get some instructions telling you to add the extension created in the local extension file in /config/localextensions.xml. This is to replicate your created extension in Hybris console.

Extensions in Hybris

Step 6:

A folder with your extension name will be added in the hybrisincustom.

Extensions in Hybris

Step 7:

Now add your extension to the xml file in the path   /config/localextensions.xml as shown below

Extensions in Hybris

Step 9:

Now make sure you closed the application server and run SETANTENV.BAT command in command prompt and start hybris server by using the command HYBRISSERVER.BAT.

Extensions in Hybris

Step 10:

After the server has started, open Hybris administration console (https://localhost:9002/) and give the credentials and click on login.

Extensions in Hybris

Step 11:

Go to extensions and search for the extension you have created.

Extensions in Hybris

The extension created here is a dummy extension and do not contain any code and purely to let you people know how we can add an extension.

 

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !