Hybris Commerce
SAP Hybris is an eCommerce platform that enables its consumers to effectively merchandise in both B2B and B2C markets. SAP Commerce addresses the business requirements of a flexible e-commerce system with powerful B2B and B2C capabilities.
Hybris comes with pre-integrated system features like Master Data, marketing, analytics and cloud integrations which are not present out of the box in its rival products. Hence the actual time to go live with Hybris is less than the competitors. SAP Hybris enables the modern-day ecommerce business to deliver a comprehensive, seamless and omnichannel experience to their customers.
Hybris B2C Commerce Setup & Recipe Installation
Hybris suite itself providing inbuilt functionalities some of them are as follows:
ANT: Which is used for building application.
TOMCAT: Which is a default application server.
SOLR: Search server/engine
HSQL: Default database.
Extensions: Which adds new features and personalize our browsing experience. We have a predefined extension as well as custom extensions. Custom extensions are those which we will define as per our requirement.
Recipe: Recipe helps the process of automating the things. Which adds extensions for the corresponding recipe for which we have selected. The installer is a Gradle-based project written in Groovy that simplifies installing SAP Commerce. It is a script that takes care of creating directories, moving files, updating configuration and properties files, and initializing the system. Below are the Hybris provided recipes which is help to find out required extensions in development of project. Hybris support both B2C or B2B commerce project. You can use any recipe as per business requirement.
Below command will use for install recipe
On Windows: install.bat -r <recipe_name> -A local_property:initialpassword.admin=property_value
On Linux or Mac: ./install.sh -r <recipe_name> -A local_property:initialpassword.admin=property_value
Example :
install.bat -r b2c_acc_plus -A local_property:initialpassword.admin=your_password
Steps of B2C Project Development
1) Download and Unzip Hybris suite. We downloaded Hybris version 1905 and extract zip file.
2) Before installing Recipe, We can see only bin folder inside hybris folder.
3) Now , Go to installer path in command prompt and run below command for B2C project.
install.bat -r b2c_acc_plus -A local_property:initialpassword.admin=nimda
nimda : It is password which we are define in command.
This command will add the required extensions to the localextensions.xml file as per the recipe name we have provided in the command.
4) After Running above command, 5 directories are created in hybris directory and config folder contains hybris config files and supportive directories. we can see localextensions.xml got created with all required extensions specified in the given recipe.
If you will open localextensions.xml. it will look like below
<hybrisconfig xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='../bin/platform/resources/schemas/extensions.xsd'>
<extensions>
<path dir='${HYBRIS_BIN_DIR}' autoload='false' />
<extension name='adaptivesearchsolr' />
<extension name='adaptivesearchbackoffice' />
<extension name='adaptivesearchsamplesaddon' />
<extension name='adaptivesearchwebservices' />
<extension name='commerceservicesbackoffice' />
<extension name='solrfacetsearchbackoffice' />
<extension name='solrserver' />
<extension name='yacceleratorbackoffice' />
<extension name='yacceleratorinitialdata' />
<extension name='yacceleratorfulfilmentprocess' />
<extension name='yacceleratorstorefront' />
<extension name='ycommercewebservices' />
<extension name='ycommercewebservicestest' />
<extension name='electronicsstore' />
<extension name='apparelstore' />
<extension name='captchaaddon' />
<extension name='acceleratorwebservicesaddon' />
<extension name='commerceorgsamplesaddon' />
<extension name='orderselfserviceaddon' />
<extension name='rulebuilderbackoffice' />
<extension name='couponbackoffice' />
<extension name='droolsruleengineservices' />
<extension name='couponfacades' />
<extension name='couponservices' />
<extension name='promotionenginesamplesaddon' />
<extension name='assistedservicestorefront' />
<extension name='assistedservicewebservices' />
<extension name='assistedserviceyprofileaddon' />
<extension name='assistedservicecustomerinterestsaddon' />
<extension name='assistedservicepromotionaddon' />
<extension name='customerticketingaddon' />
<extension name='customersupportbackoffice' />
<extension name='profiletagaddon' />
<extension name='profileservices' />
<extension name='textfieldconfiguratortemplatebackoffice' />
<extension name='textfieldconfiguratortemplateaddon' />
<extension name='cmswebservices' />
<extension name='smarteditwebservices' />
<extension name='cmssmarteditwebservices' />
<extension name='permissionswebservices' />
<extension name='smarteditaddon' />
<extension name='cmssmartedit' />
<extension name='cmsbackoffice' />
<extension name='cmsoccaddon' />
<extension name='consignmenttrackingaddon' />
<extension name='consignmenttrackingmock' />
<extension name='consignmenttrackingbackoffice' />
<extension name='notificationaddon' />
<extension name='customerinterestsaddon' />
<extension name='stocknotificationaddon' />
<extension name='configurablebundleaddon' />
<extension name='previewpersonalizationweb' />
<extension name='personalizationcmsweb' />
<extension name='personalizationsmartedit' />
<extension name='personalizationpromotionssmartedit' />
<extension name='personalizationsampledataaddon' />
<extension name='personalizationpromotionssampledataaddon' />
<extension name='personalizationyprofile' />
<extension name='personalizationpromotions' />
<extension name='personalizationpromotionsweb' />
<extension name='personalizationservicesbackoffice' />
<extension name='personalizationpromotionsbackoffice' />
<extension name='personalizationcmsbackoffice' />
<extension name='personalizationintegrationbackoffice' />
<extension name='personalizationsearchbackoffice' />
<extension name='personalizationsearchsmartedit' />
<extension name='personalizationsearchweb' />
<extension name='personalizationsearchsamplesaddon' />
<extension name='personalizationyprofilesampledataaddon' />
<extension name='personalizationaddon' />
<extension name='pcmbackofficesamplesaddon' />
<extension name='xyformsbackoffice' />
<extension name='xyformsstorefrontcommons' />
<extension name='xyformssamples' />
<extension name='xyformsweb' />
<extension name='platformbackoffice' />
<extension name='orbeonweb' />
<extension name='consignmenttrackingoccaddon' />
<extension name='customerinterestsoccaddon' />
<extension name='notificationoccaddon' />
<extension name='kymaintegrationbackoffice' />
<extension name='outboundservices' />
<extension name='outboundsync' />
<extension name='odata2webservices' />
<extension name='odata2webservicesfeaturetests' />
<extension name='integrationbackoffice' />
<extension name='integrationmonitoringbackoffice' />
<extension name='outboundsyncbackoffice' />
<extension name='merchandisingaddon' />
<extension name='merchandisingcmswebservices' />
<extension name='merchandisingsmartedit' />
<extension name='merchandisingservices' />
<extension name='merchandisingservicesbackoffice' />
<extension name='merchandisingstorefrontsampledataaddon' />
</extensions>
</hybrisconfig>
5) Now, Go to platform C:\HYB-1905\hybris\bin\platform in cmd console and run setantenv.bat
6) For Create our project codebase, we need to run modulegen command. Modulegen command is used to create the module. It creates the set of extensions based on the module template we select. Generally for B2B and B2C module , it creates 7 extensions which are logically related and grouped.
we are giving module name training, package prefix com.experts.hybris.training and template develop. But you can define as per your requirement.
ant modulegen -Dinput.module=accelerator -Dinput.name=training -Dinput.package=com.experts.hybris.training -Dinput.template=develop
7) You can see the next steps to be performed in the command prompt. We will add our custom extensions and remove all yaccelerator extensions (yacceleratorfulfilmentprocess, yacceleratorcore, yacceleratorfacades, yacceleratortest, yacceleratorinitialdata, yacceleratorbackoffice, yacceleratorstorefront) from localextensions.xml file
8) Run ant clean all command in the command prompt if build is success then Start the hybris server using the hybrisserver.bat command. If , you want to run server debug mode use hybrisserver.bat debug command. Debug mode mean you can debug your at code run time.
9) After start server, we need to run initialization mean it is create database for ecommerce website and upload required master data for website.
We can initialization of the system in 2 ways
Using below command in command prompt using ant initialize command
Initialize from HAC directly.
We are running from HAC
Open URL: https://localhost:9002/platform/init in browser. Open screen make sure Toggle all checkbox is selected and click on initialize button and wait till confirm the initialization.
10) Enter below URL in Host file in C:\Windows\System32\drivers\etc and save.
127.0.0.1 apparel.local
127.0.0.1 electronics.local
Now, you can accessing sample sites using below url
Apparel Store
http://apparel.local:9002/trainingstorefront/?site=apparel-uk
Electronics Store
https://electronics.local:9002/trainingstorefront/en/?site=apparel-uk
Now you can access sample sites of Hybris. You can customize site as per your requirement after update in generated code base and change banner, title label with help to impex and properties files. Master data can be load by impex only. If you want to add or customize any functionality, You need to override or add code in our generated training project.