Skip to Content
Author's profile photo Vamsi krishna

Extensions in Hybris

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.

Step 2:

Run the command “setantenv.bat”.

 

Step 3:

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

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 ).

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 <HYBRIS_BIN_DIR> /config/localextensions.xml. This is to replicate your created extension in Hybris console.

Step 6:

A folder with your extension name will be added in the <HYBRIS_BIN_DIR> \hybris\bin\custom.

Step 7:

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

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.

Step 10:

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

Step 11:

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

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.

 

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi,

      Thanks for the Useful blog post.

      Also take a look at the SAP Hybris Extensions Infographic - Click Here

      Thanks.

      Author's profile photo Former Member
      Former Member

      Thanks for this, Vamsi. I have a question on step 9. How do we make sure that the 'application server is closed'? Thanks