Thursday 6 December 2018

EXTGEN in hybris

  
*  SAP Commerce comes with an extension generator system called extgen.
*  You can create new extensions based on extension templates. 
*  To add your own template extension to the selection of extgen templates please add the following line to the extensioninfo.xml of your extension.
<meta key="extgen-template-extension" value="true" />

Follow the steps to create custom backoffice extension.

Step 1:- Go to platform directory and run ant extgen command.



Step 2:- Select the extension template you want to generate.(ybackoffice)





Step 3:- Enter the extension name.



Step 4:- Enter the package name.



Step 5:- Register as a SASS extension? ([true], false)
If you select ‘true’ the generated extension contains Sass registration in the buildcallbacks.xml file.

The variables file myextension-variables.scss is also created in the myextension/backoffice/resources/scss directory


Step 6:- Create a sample widget? ([true], false)

    It will decide if you want a sample widget to be generated. If not, do not forget to manually create a widgets folder in myextension/backoffice/resources directory.

Here, you can add a new directory for each component that you create.



Step 7:- Create sample style sheets? (true, [false])

Decide if you want a sample style sheets to be generated



Step 8:- Add the new extension to your localextensions.xml file (config folder).



Note:- To load all custom extensions automatically into the localextensions.xml file, add the following line, at the beginning of the file.
<path autoload="true" dir="${HYBRIS_BIN_DIR}/custom"/>

Step 9:- Do ant all & start the server.



No comments:

Post a Comment