New features in SAP Hybris Commerce 6.6

New features in SAP Hybris Commerce 6.6

The SAP Hybris Commerce release 6.6 includes key enhancements, focus on Enabling Consent and Personal Data Management. The following features are included in SAP Hybris Commerce 6.6 :-

  • GDPR(General Data Protection Regulation)
  • SAP Hybris Customer Experience Enhancements
  • Enhancement to Search and Navigation
  • SAP Hybris Product Content Management
  • SAP Integrations

GDPR(General Data Protection Regulation)

SAP Hybris Commerce 6.6 includes key enhancements to enable organizations to implement processes to be compliant with the GDPR. These capabilities include consent management, security, encryption, reporting, and data management. The new GDPR feature include:-

  1. Consent Management

    Consent management offers better transparency and customer engagement by allowing users to grant consent for their personal data to be captured and processed.

  2. Personal Data Reporting

    Personal Data Reporting allows the reporting of personal customer data that is captured, to be generated and provided to customers.

  3. Customer Account Closure

    Customer Account Closure allows customers to close their website accounts at any time using self service.

  4. Personal Customer Data Annotation Framework

    Personal Customer Data Annotation Framework allows the easy configuration of personal customer data so it can be flagged and used for Personal Data Reporting.

  5. Personal Customer Data Retention/Erasure Framework

    Personal Customer Data Retention/Erasure Framework provides the ability to retain or delete a customer’s personal data based on legal/configurable retention periods.

  6. Generic Audit

    Generic Audit stores all personal customer data changes. It allows the storage every change made to all instances of given data type. You can enable what data items get audited at the properties level with type-level granularity.

 Advantages

  • Enable compliance of General Data Protection Regulation.
  • Minimize business disruption.
  • Earn customer trust and confidence.

SAP Hybris Customer Experience Enhancements

  1. SmartEdit for Customer Experience

    SmartEdit for SAP Hybris Customer Experience provides an easy and intuitive way to edit and manage your website across all touch points from a single interface. The following features and framework enhancements have been introduced to SmartEdit in SAP Hybris Commerce 6.6

    • Cloning Components
    • Moving Pages to trash
    • Converting shared slots to non-shared slots
    • Framework improvements, such as a new build system and management of nested components.
  1. Personalization

    SmartEdit for SAP Hybris Customer Experience provides an easy and intuitive way to edit and manage your website across all touch points from a single interface. The following features and framework enhancements have been introduced to SmartEdit in SAP Hybris Commerce 6.6

    • Cloning Components
    • Moving Pages to trash
    • Converting shared slots to non-shared slots
    • Framework improvements, such as a new build system and management of nested components.

Advantages

  • Increase flexibility of personalization.
  • Enhance customer experience.
  • Drive sales and increase conversion.

Enhancement to Search and Navigation

Search and Navigation capabilities allow you to configure how your customers browse through category navigation and search for products based on keywords or facets. The following features are new in SAP Hybris Commerce 6.6

  1. Enhanced search experience with Personalization

    You can easily apply personalized search settings by applying Search Profiles for selected Target Group on the top of the search Profiles that had been already activated in the Activation Set. To provide even more targeted experience, you can activate Search Profiles for different Target Groups and they will be all combined together if the user qualifies for more than one Target Group.

  2. Improved Solr Security

    The SAP Hybris Commerce 6.6 comes with support to encrypt communications to and from Solr, and between Solr nodes, using SSL. SAP Hybris Commerce 6.6 also offers support for authentication and authorization using the security framework of Solr.

  3. Solr Upgrade to 7.1

    In this release they have upgraded to the new Solr major version 7.1 to keep up with Solr enhancements.

Advantages

  • Offer personalization experience for product search.
  • Drive sales and increase conversion.

SAP Hybris Product Content Management

With the SAP Hybris Commerce 6.6 release they have introduced a new Microsoft Excel Import/Export Feature and enhanced the collaboration Center with the Workflow Visualization feature.

  1. Microsoft Excel Import/Export

    SAP Hybris Commerce 6.6 would allow you to fulfill two scenarios

    • Export selected products and perform a mass editing through the spreadsheet and then re-import them again.
    • Download an empty Excel sheet that is pre-populated with all the attributes defined in your system, and import new products using the this Excel template.

    This new feature of Product Content Management(PCM) will make the life of product content managers a whole lot easier.

  2.  The Workflow Visualization

    The Workflow Visualization allows you to visually see the workflow. With the SAP Hybris Commerce 6.6 release they have also introduced a feature that allow you to clone a product. This serves as a base for an extended feature where you will be able to clone a product multiple times.

Advantages

  • Enhance usability.
  • Increase flexibility of the tool.
  • Enable higher productivity.

SAP Integrations

SAP Integrations provides a framework for connecting the omni-commerce capabilities of SAP Hybris Commerce with other SAP products. The release note cover the following

  1. SAP Back-End Integration: SAP S/4HANA and SAP ERP

    The following feature are in the new release:-

    • Allows the cancellation of return orders.
    • Fixed the issue regarding the modification of refund amount by customer support agent using Backoffice. The modified refund amount is now reflected in the back end.
    • Data Privacy Management.
  1. SAP CPQ for Product Configuration

    SAP CPQ for product configuration provides access to a comprehensive solution to manage personalized and customizable products in and with SAP Hybris Commerce. The following feature are new in the release:-

    • Enhancements for product configuration rules.
    • Switch for option price.
  1. SAP Product Configuration Integration

    The SAP Product Configuration integration provides access to a comprehensive solution to manage personalized and customizable products in and with SAP Hybris Commerce Cloud. The following feature are new in this release:-

    • Support of multilevel products.
    • Conflict handling.
    • Reconfiguration for product configuration rules.
    • Switch for option price.
  1. SAP Hybris Marketing Integration

    SAP Hybris Marketing integration allows you to offer your customers personalized interactions and shopping in an online store. The following feature are new in this release:-

    • Data privacy Management.
    • Campaign restriction in SmartEdit.
  1. SAP Hybris Cloud for Customer Integration

    The SAP Hybris Cloud for Customer integration with SAP Hybris Commerce 6.6 includes quote replication developments. The following feature are new in this release:-

    • Sales quote replication from SAP Hybris Commerce to SAP Hybris Cloud for Customer.
    • Update the commerce quote from SAP Hybris Cloud for Customer with the price and discounts.
    • Convert quote to sales order and replicate to SAP ERP or SAP S/4HANA.
  1. SAP Digital Payment Integration

    SAP Hybris Commerce integration with SAP Digital Payments enables a B2C customer to register a credit card, fetch the card details and authorize the payment during the item checkout process. The following features are new in this release:-

    • Digital payments integration is avaialble with B2B scenario as well.
    • The existing credit card can be removed from the My Accounts -> Payment Details ->page.
    • If an order is returned, then the payment done using credit card will be reversed.
    • The configurations are now made available in the Backoffice Administration Cockpit.

Advantages

  • Advanced campaign management capabilities.
  • Additional integration scenarios.
  • More end-to-end processes.
  • Better customer experience.

AddOn Concept

AddOn Concept

AddOns are built on top of the existing SAP Hybris Commerce to extend the functionality of the SAP Hybris Commerce Accelerator. AddOns are a type of extension that allow you to add front end files(such JSP, HTML, CSS and JavaScript files, as well as images) from within your own AddOn, Instead of modifying the storefront-end files directly.

Using AddOns, you can extend the functionality of Hybris Commerce Accelerator without editing the core code base. The core code base in this context means Hybris Platform, and all additional extension delivered with Hybris Commerce Accelerator. An AddOn is a regular extension that may or may not provided additional front-end components to Hybris Commerce Accelerator.

Advantages of AddOn Concept

  1. AddOn file kept separate from the rest of the front-end files.
  2. When you upgrade the Accelerator, it will not overwrite your files.
  3. You can easily remove your AddOns without refactoring the code of your whole extension.

Creating AddOns

To create your custom AddOn follow the following steps:

1.Open the command prompt and

navigate to the <%HYBRIS_HOME_DIR%>hybris/bin/platform directory.

navigatetoplatform

2.Now run the setantenv.bat file. Do not close the command prompt.

setantenv

3.Run the following command to create your custom AddOn

ant extgen -Dinput.template=yaddon -Dinput.name=myaddon -Dinput.package=com.myapp

Before running above command you can observe that inside hybris/bin/custom folder only single extension(bitbyte)

before creation of addon

Now Run the following command from platform

create addon

After running the above command you can see your custom AddOn inside hybris/bin/custom folder.

hybris diary addon

4.Configure localextension.xml file

Add your custom extension (AddOn) to <%HYBRIS_HOME_DIR%>/hybris/config/localextensions.xml

localextenstion.xml
localextensions.xml

now rebuild the Hybris system by running ant clean all .

ant clean all

Installing an AddOn for specific storefront

The addoninstall tool allow you to configure an AddOn for a specific storefront. It also adds the AddOn to the extensioninfo.xml file of the storefront, and generates the relevant project.properties file for the AddOn.

Now follow the following steps to install AddOn

  1. Before running ant addoninstall command ensure that addonsupport extension is listed in localextensions.xml file.
addonsupport extension in localextension.xml
localextensions.xml

Also ensure that the AddOn and storefront extension that you want to install are listed in localextensions.xml file.

2.Now run the following command to install the AddOn

ant addoninstall -Daddonnames="addonname" -DaddonStorefront.<storefrontTemplateName>="StoreFront"

addoninstall

3. When addoninstall has finished running successfully, rebuild the Hybris system by running ant clean all .

Uninstalling an AddOn for a specific storefront

The addonuninstall tool can be used to remove an AddOn from the storefront.

Now run the following command to uninstall the AddOn

ant addonuninstall -Daddonnames="addonname" -DaddonStorefront.<storefrontTemplateName>="StoreFront"

addonuninstall

When addonuninstall has finished running successfully, rebuild the Hybris system by running ant clean all .

 

Flexible Search Caching with TTL

images

 

Flexible queries are already cached in hybris commerce which provide good performance in most of projects. Generally, hybris regions cache performs well when system has more read of data than writes. Frequent changes to data (products, images, master data etc.) will result in invalidation of cached entities, types and flexible queries on all nodes forcing system to fetch data from database as cache has been invalidated. Projects having very frequent changes in database can suffer from high performance degradation due to frequent invalidations.

In this post we will be discussing an option to stop invalidation of query for specified amount of time irrespective of change in items in database, this feature is called TTL – Tme To Live. The value of TTL is defined in session context which enforces query to live at least for this duration. Implementation of TTL can significantly improve performance in applications which have frequent changes in database.

Below are steps to executed to implement TTL in a project:

  1. Create an aspect class as below – this class is picking configurable properties: a flag and duration of TTL (in seconds) from configuration file and sets in session context:

1

  1. Define spring bean:

2

  1. Add AOP configuration for specific methods to enable TTL caching:

3

Please note this feature should be tuned as per your use case.  Applications with less writes than reads can have adverse affect on performance. Downside of this configuration is that cached queries will not pick changes immediately on storefront for the defined time so there need to be ballance between performace gain vs data accuracy.  Overall this is a very good option to finetune the performance of hybris applications.

Try it and enjoy improved performance!

 

Extgen

Extgen

SAP Hybris commerce ships with an extension generator tool called extgen, which is short for extension generator. Using extgen tool, you can create new extension based on extension templates. With the extgen tool, you can create one new extension using one template extension. From a technical perspective, any extension can be used as a template extension. The extgen tool is fairly basic in that it simply replaces the tokens configured in properties file.

SAP Hybris Commerce installation

Before running the extgen tool, you need to download the latest version of SAP Hybris Commerce.

Once you have downloaded SAP Hybris Commerce, extract the Hybris Commerce ZIP file.

1.Open a command prompt.

cmd

2.Navigate to the %HYBRIS_HOME_DIR%/installer directory.

navigate

3. Invoke the installer with the b2c_acc recipe by entering the following command.

installer

Steps to create an extension using extgen

1.Navigate to the %HYBRIS_HOME_DIR%/hybris/bin/platform directory

platform

2. Now run setantenv.bat file. Do not close the command prompt.

setantenv

3.Now run

extgen

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

Choose a template for generation

Press enter to use the default value. Here default value is [yempty] and we press enter.

template

Choose the name of extension

Here we specify the name of the extension is hybrisdiary.

extensionname

Choose the package name

We can choose default package name for our extension but we specify the name of the package is org.bitbyte .

 package

Now observe that new extension(hybrisdiary) has been created inside hybris/bin/custom folder.

 custom

Configure localextension.xml file

Add your extension to your X:\%HYBRIS_HOME_DIR%\hybris\config/localextensions.xml. After the creation of extensions using extgen, make sure to update the localextensions.xml file as below

localextension

localextension.xml file

Navigation management through SmartEdit

Navigation management through SmartEdit

SmartEdit provides Navigation management that enables you to add, move, edit and delete navigation nodes for a content catalog. You can easily change the order of the navigation nodes using drag and drop feature. You can also add, edit and remove entries from navigation nodes. Entries are pages, media, and components that you associate with navigation nodes.

When you create a website based on an existing content catalog, a default navigation structure is created for your content catalog. If you create a website based on a new content catalog, you must build navigation structure for your new content catalog.

 

Signing into SmartEdit

SmartEdit provides an intuitive user interface that allows content managers to easily edit the content catalog of their companies website.

Procedure

We assume that your server has started already and now follow following steps to sign in into SmartEdit

  1. Open an internet browser.
  2. Enter https://<server.ip.address>:9002/smartedit in the browser’s address bar.
  3. Enter your credentials.(username=’admin’ and password=’nimda’)
  4. Select the language and sign in.

smartedit

All the catalogs that are available in your websites are displayed in the Your Site page.

yoursite

Adding Navigation Nodes

We can add following types of navigation nodes:

  1. Top level
  2. Sibling
  3. Child

 

Adding a Top level Node

toplevel

Click on + ADD NEW TOP LEVEL and after that Enter the name of the node and title of the node to the corresponding fields and press save.

topnode

Now you can see that Bitbyte added as top level node to the site.

addnode

Adding Sibling and Child Nodes to Navigation Nodes

Go to navigation node that you want to add a sibling or child node to and Click the Option menu and select Add a Sibling or Add a child. Here we will add child node.

option

After that we enter the name and the title of the child and save it.

child

Now you can clearly observe that one child node(Hybrisdiary) added to the Bitbyte node.

addchild

AngularJS MVC and Scopes

AngularJS MVC Architecure

MVC stands for model view controller. It is a software design pattern for developing web applications. It is very popular because it isolates the application logic from the user interface layer and supports separation of concerns. The controller receives all requests for the application and then works with the model to prepare any data model by the view. The view then uses the data prepared by the controller to generate a final presentable response. The MVC abstraction can be graphically represents as follows

mvc

1. Model

It is responsible for managing application data. It responds to the request from view and to the instructions from controller to update itself.

2. View

It  is responsible for displaying all data or only a portion of data to users. It also specifies the data in a particular format triggered by the controller’s decision to present the data.

3.Controller

It is responsible to control the relation models and views. It responds to user input and performs interactions on the data model objects. The controller receives input, validates it, and then performs business operations that modify the state of the data models.

AngularJS Scopes

Scope is a special JavaScript object which plays the role of  joining controller with the views. Scope contains the model data. In controller, model data is accessed via $scope object.

Example:

 scope

Code Explanation

  1. Scope is passed as first argument to controller during its constructor definition.
  2. $scope.firstName and $scope.lastName are the models.
  3. We have set values to models which will be reflected in the application module whose controller is myController.

Output

scopeoutput

AngularJS Modules and Controller

AngularJS Modules

A module defines an application. It is container for the different parts of your application like controller, services, filters, directives etc.

Controller always belong to a module.

Creation of a module

A module is created by using the AngularJS function angular.module

module

The “myApp” parameters refers to an HTML element in which the application will run. Now we can add controllers, directives, filters, and more, to your AngularJS application.

AngularJS Controllers

AngularJS application mainly relies on controllers to control the flow of data in the application. A controllers is defined using ng-controller directive. A controllers is a JavaScript object containing attributes/properties and functions. Each controller accepts $scope as a parameter which refers to the application/module that controller is to control.

Example:

In the following example we will explain module and controller.

 controller

Output:

 controleroutput

Code Explanation:

  • ng-app directive is used to denote that this application should be considered as an angular application. “myApp” is the name given to our AngularJS application.
  • In body tag we have added an ng-controller directive along with the name of our controller “myControl”. This basically makes our body tag the ability to access the contents of the “myControl”. We need to mention the name of the controller under the directive to ensure that we are able to access the functionality defined within the controller.
  • We are creating a module which will attached to our “myApp” So this module now becomes part of our application.
  • In the module, we define a function which assigns a value of “Bit” and “Byte” to our firstName and lastName variables respectively.