Steps to Create a New Extension?

To create a new extension:

  1. Optionally: Modify default values for the extension generation process.
  2. Create a new extension.
  3. Reference the new extension in the localextensions.xml file.
  4. Rebuild the hybris Commerce Suite.
  5. Update the hybris Commerce Suite.

Afterwards, you can start implementing your business logic in the new extension.

The hybris Commerce Suite comes with an extension generator system called extgen located in the ${HYBRIS_BIN_DIR} /platform/extgen/ directory. Using extgen, you can create new extensions based on extension templates.

Creating a New Extension:

Step 1: Optional: Setting Default Values for New Extensions

You can personalize extgen default behavior by modifying the project.properties file located in ${HYBRIS_BIN_DIR} /platform/extgenExtgen  then uses your settings as the default to generate the extension.

Modifying the default values is only necessary for advanced settings. Extgen prompts you to provide the basic values during the extension generation process.

Step 2: Copy an Extension Template Using Extgen

An extension template is a predefined basic extension to be duplicated. The copy serves as a starting point for creating a new extension, typically used for a customer specific implementations.

  1. Open a command prompt.
  2. Navigate to the ${HYBRIS_BIN_DIR} /platform directory.
  3. Run the ${HYBRIS_BIN_DIR} /platform/setantenv.bat file. Do not close the command prompt as the settings are transient and are lost if the command prompt is closed.
  4. Run ant extgen in ${HYBRIS_BIN_DIR} /platform directory. This internally runs ant in the extgen directory.
Extgen prompts you to specify values for the technical aspects of an extension. Extgen comes with default values for all these technical aspects. These default values are defined in the project.properties file in the extgen directory. The default value is displayed in brackets ([ and ]), such as:
Press [Enter] to use the default value [training]
 You can simply use the default value by pressing Enter.
Note:
Not All Possible Configuration Settings Are PromptedExtgen only prompts you for the most important values for your extension. To modify some advanced settings such as the extension directory, you need to modify the project.properties file in the extgen directory.

Extgen prompts you to specify:

  • The extension's name.
  • The extension's Java package.
  • The extension template to use. 

After you have provided the prompted values, extgen:

  1. Copies the extension template to a temporary directory.
  2. Modifies the extension template to reflect the specified values.
  3. Copies the new extension from the temporary directory to the directory specified by the extgen.extension.path property in the project.properties file.

After the copy process is completed, the extension is ready to be referenced in the localextensions.xml.

Step 3: Reference the New Extension in localextensions.xml File

To make sure that an extension is integrated into the build framework, you need to reference the extension 

in the localextensions.xml file. Please note that by default this file only contains references to folders 

from which it loads all extensions:

localextensions.xml

<path autoload="true" dir="${HYBRIS_BIN_DIR}/ext-platform"/>

<path autoload="true" dir="${HYBRIS_BIN_DIR}/ext-cockpit"/>

<path dir="${HYBRIS_BIN_DIR}"/>

Hence, if you want to add a new extension, myextension, add this line

to localextensions.xml:

localextensions.xml

<extension name="myextension"/>

Step 4: Rebuild the hybris Commerce Suite

  1. Open a command prompt. 
  2. Navigate to the ${HYBRIS_BIN_DIR}/platform directory. 
  3. Make sure that a compliant version is used: 
    • On the Windows operating system, call the ${HYBRIS_BIN_DIR}/platform/setantenv.bat file. Do not close the command prompt after this call as the settings are transient and would get lost if the command prompt is closed. 
    • On the Unix operating system, call the ${HYBRIS_BIN_DIR}/platform/setantenv.sh file, such as: . ./setantenv.sh
  4. Call ant clean all to build the entire hybris Commerce Suite

Configure an Extension:

An extension is configured by the extensioninfo.xml file. It defines the contained extension modules 

and list of extensions that the current extension depends on.

To define properties of the extension, use the local.properties file. 



Define Product Cockpit?

  • Hybris Product Cockpit Module enables cockpit end users to manage and structure product information and catalogs in high-volume and collaborative environments. 
  • Product managers can visualize their input from multiple perspectives and make product management processes more efficient.
  • Several perspectives enable users to concentrate on the most important aspects of individual tasks, such as managing product data or structuring categories.
 1.    Managing Product Data:
  • Organizations ideally want to administer and edit information about different product lines and multiple products with varying attributes from within a single user interface. 
  • Available software, however, may offer product managers limited data management capabilities. They may not be able to customize the user interface to meet their specific needs and preferences. 
  • And employees often work across multiple systems that are not integrated, which can create collaboration challenges.
 2. Use the Hybris Product Cockpit for Managing All Product Information in One Place:
  • The Hybris Product Cockpit is a highly customizable graphical user interface that makes product data management more efficient, process-oriented, and user friendly. 
  • Perspectives can be configured to display role-based sets of user interface elements. Mass data management capabilities support and simplify workflows and synchronization. 
  • As a pre-configured application, the Hybris Product Cockpit supports customizations - such as changing the front-end configuration or adding custom front-end elements - without requiring additional implementation work. 
  • You can manage all kinds of product information and multimedia with the Hybris Digital Asset Management module. 
The Hybris Product Cockpit is an ideal product data management solution that delivers both excellent usability and significant potential cost savings.

3. Benefits:
The Hybris Product Cockpit provides you with the following benefits:
  • Streamlining catalog and product management through its well-structured user interface.
  • Supporting typical working processes through a fully customizable user interface.
  • Optimization of team work by managing even complex workflows.
  • Facilitating efficient mass data management.
  • Providing seamless workflow management through tracking, commenting, and status changes.
  • Delivering a thin client with rich user experience, such as drag and drop, favorites, and so on.
  • Support for product-related workflow tasks and synchronization.
  • Validation rules to control data formats.
  • Support for extensive product comparisons.
  4. Business Impact:
  • Employees across subsidiaries and departments can access centralized information via role-based security profiles, ensuring that users only view or edit content that is relevant to them. 
  • Access rights can be defined for various product attributes, product classes, or catalog versions. 
  • The Hybris Product Cockpit is ideal for businesses with distributed product content responsibilities, as content managers can work on staged product versions, without affecting the live version displayed on the website.
  5. Features:
  • Ability to view products, product categories, and product attributes in different perspectives
  • Catalog perspective for working with catalog versions and categories
  • List views of product result sets
  • Grid views of product result sets
  • Ability to set references to product-related business objects such as units, media, catalog versions, prices, etc
  • Mass data editing while using the list view
  • Ability to move data via copy/paste
  • Customization of views at runtime, for example add or remove list columns, sections, or fields
  • Switchable user roles
  • User-based lists of favorites
  • Easy handling of workflow actions like tracking, commenting, and changing status
  • Synchronization of single products, categories, or catalog versions
  • Integrated digital asset management, requires Hybris Digital Asset Management module