top of page

B2C Architecture

​

​

The B2C Accelerator is a framework or set of pre-built components that helps businesses rapidly build and deploy B2C (Business-to-Consumer) e-commerce solutions. It provides a foundation for creating feature-rich online storefronts and can significantly speed up the development process. Here's an overview of the key components and features of a B2C accelerator in Hybris.

​

​

​

 

 

 

 

 

 

 

 

 

 

 

Here are the key components of B2C accelerator as shown in the above screenshot:

 

1) ystorefront : This is web layer of the hybris and it consist of code related to spring mvc and spring security. It also offer a set of responsive and customizable storefront templates. These templates are designed to provide a user-friendly and visually appealing online shopping experience across various devices.
2) yfacades: This layer is in the middle of storefront and  core / service layer. This layer plays an important role in the calculation of the business logics and also conversion of the data from pojo to model or model to pojo using converter and populators. 

3) ycore: This layer is also called the service layer. It mainly consist of models which interacts with the data base and also any business logic related to item models. 

4) ycockpits: Ycockpits consist of the implementation related to cockpit like hac, backoffice, cs cockpit and  cms cockpit. We can customize the functionalities related to cockpits by implementing the cockpits features. 

5) Yfullfilmentproces: This component consist of the business process or workflow related changes like order process, consignment process, payment process, refund process etc. We can implement this extension for multiple customization. 

6) ytest: This component consist of integration test for the multi layer functionalities

​

B2C Accelerator Installation

6) 


We have divided the accelerator installation in multiple steps as discussed below:

 

1) Download and unzip the suite file: The hybris suite file is given in the form of zip from SAP Portal which we need to download from SAP portal and unzip the file using some advance unzip software like 7 zip. We can utilize any hybris version above 6.0 for installation as per requirement. 

​
 

​

​

​

​

​

​

​

​

​

​

​

2) Recipe Installation: We can now install the recipe by utilizing the above unzipped file. We can install the B2C, B2B and china accelerator as per requirement. 

The command to install Recipe is install.bat –r recipeName.  Go to installer path in command prompt and run below code to install any one recipe :

C:\projects\hybriscommerce\installer>install.bat -r b2c_acc_plus

or 

C:\projects\hybriscommerce\installer>install.bat -r b2c_china

​

Following folder structure will be created once installation is done. Inside the config folder  in local.extension file all the required extension will be .

​

​

 

 

 

 

 

 

 

 

 

3) Generate Custom Extensions using Modulegen:  We have to add the custom extension to add the project specific requirements. We can run the modulegen command to generate the set of standard extension which can be letter used for customization. A

 

ant modulegen -Dinput.module=accelerator -Dinput.name=training -Dinput.package=com.hybriswiki.training -Dinput.template=develop

​

After running the modulegen command in the command prompt we can see the set of training related extensions got generated. We have to add the custom extensions in the localextensions.xml  file in config older. 

​

  • Add the generated extensions to the localextensions.xml file.

 

<extension name="trainingfulfilmentprocess"/>

<extension name="trainingcockpits"/>

<extension name="trainingcore"/>

<extension name="trainingfacades"/>

<extension name="trainingtest"/>

<extension name="traininginitialdata"/>

<extension name="trainingstorefront"/>

​

  •  Delete the following extensions from localextensions.xml file.

 

<extension name="yacceleratorfulfilmentprocess"/>

<extension name="yacceleratorcockpits"/>

<extension name="yacceleratorcore"/>

<extension name="yacceleratorfacades"/>

<extension name="yacceleratortest"/>

<extension name="yacceleratorinitialdata"/>

<extension name="yacceleratorstorefront"/>

​

​

4) Build code and Start hybris server: We can now run the build and start server from the platform folder using the following commands. 

  • Build Code : ant clean all 

  • Start server: hybrisserver.bat 

​​

5) System Initialization: Initialize the hybris system it will create the new DB schema, new index configuration and also set up the cockpit related data like backoffice/ cmscockpit.  We can do initilization in two way. 

  • Initialize from CMD  :  Go to the platform folder and run the ant intialize command. 

  • Initialize from HAC:

    • Go to url  http://localhost:9001 /hac url after server start.

    • Select the toggle all option and click on the initialize button.

    • This process will take some time wait for successful completion then proceed for next steps.

​

​

​

​

​

​

​

​

​

​

​

​

7) Host file configuration: Add below mappings in the host file at the at path C:\Windows\System32\drivers\etc\location. 

​

127.0.0.1 apparel.local
127.0.0.1 electronics.local

​​

​

8) Access the site in browser:Now you should be able to access the url http://electronics.local:9001/trainingstorefront.

​

​

​

arthiticure
folder structure
folder structure
HAC screen
Store Screen

About the Author

 

Piyush Singh is a seasoned technology enthusiast and educator with a passion for making complex concepts accessible to everyone. With over 10 years of experience in the tech industry working as consultant,  Piyush specializes in Java, Sap Hybris technology and has a knack for breaking down intricate topics into easy-to-follow tutorials.

​​​​​​​

   Connect with Author

LinkedIn

Email

​

​

bottom of page