Hybris B2B Installation


Installing Hybris B2B

If we want to install B2B accelerator, we first need to run B2C recipe and then install B2B addon

Step 1

Navigate to the “< HYBRIS_HOME >/installer” directory

Step 2

Invoke the Installer with the b2c_acc recipe by entering the following command

On Windows :

  1.  install.bat -r b2c_acc
 install.bat -r b2c_acc


On Linux or Mac :

  1. ./install.sh -r b2c_acc
./install.sh -r b2c_acc


install_command_b2b_recipe

Wait for the build to get success

Step 3

In command prompt, Navigate to the < HYBRIS_BIN_DIR >/platform directory.

Step 4

Set ant environment by entering the following command

On Windows :

  1.  setantenv.bat
 setantenv.bat


On Linux or Mac :

  1.  . ./setantenv.sh
 . ./setantenv.sh


set_ant_command

Step 5

Run the ant modulegen command and modify the input.name and input.package parameters as per project requirement

  1. <!--Run the modulegen command-->
  2. ant modulegen -Dinput.module=accelerator -Dinput.name=mystore -Dinput.package=com.kb -Dinput.template=develop
<!--Run the modulegen command-->
ant modulegen -Dinput.module=accelerator -Dinput.name=mystore -Dinput.package=com.kb -Dinput.template=develop


input.module parameter : Configures the modulegen task to use the accelerator module.
input.name value : Indicates the prefix that is added to the new extensions generated by modulegen.
input.package value : Defines the default Java package prefix.
input.template parameter : Defines how to use the default Hybris configuration

Step 6

After running the ant modulegen command successfully, open the ” localextensions.xml ” file located in
< HYBRIS_HOME >/hybris/configfolder
.

Step 7

Add the new extensions generated by modulegen to the “localextensions.xml” file

  1.      <extension name="mystorefulfilmentprocess"/>
  2.      <extension name="mystorecockpits"/>
  3.      <extension name="mystorecore"/>
  4.      <extension name="mystorefacades"/>
  5.      <extension name="mystoretest"/>
  6.      <extension name="mystoreinitialdata"/>
  7.      <extension name="mystorestorefront"/>
     <extension name="mystorefulfilmentprocess"/>
     <extension name="mystorecockpits"/>
     <extension name="mystorecore"/>
     <extension name="mystorefacades"/>
     <extension name="mystoretest"/>
     <extension name="mystoreinitialdata"/>
     <extension name="mystorestorefront"/>

Step 8

As instructed in the console output, remove the following extensions which are present in your “localextensions.xml” file

yacceleratorcore
yacceleratorfacades
yacceleratorstorefront
yacceleratorinitialdata
yacceleratortest
yacceleratorcockpits
yacceleratorfulfilmentproces

Step 9

Add the following B2B Accelerator extensions to the “localextensions.xml” file

  1. <extension name='powertoolsstore' />
  2. <extension name='b2bcommercebackoffice' />
  3. <extension name='b2badmincockpit' />
  4. <extension name='b2bacceleratoraddon' />
  5. <extension name='commerceorgaddon' />
<extension name='powertoolsstore' />
<extension name='b2bcommercebackoffice' />
<extension name='b2badmincockpit' />
<extension name='b2bacceleratoraddon' />
<extension name='commerceorgaddon' />

Step 10

Install the B2B Accelerator AddOns on the mystore storefront by running the following ant command from the
< HYBRIS_BIN_DIR >/platform folder

  1. <!--Command to install the AddOns-->
  2. ant addoninstall -Daddonnames="b2bacceleratoraddon" -DaddonStorefront.yacceleratorstorefront="mystorestorefront"
  3. ant addoninstall -Daddonnames="commerceorgaddon" -DaddonStorefront.yacceleratorstorefront="mystorestorefront"
<!--Command to install the AddOns-->
ant addoninstall -Daddonnames="b2bacceleratoraddon" -DaddonStorefront.yacceleratorstorefront="mystorestorefront"
ant addoninstall -Daddonnames="commerceorgaddon" -DaddonStorefront.yacceleratorstorefront="mystorestorefront"

Step 11

Add the following properties to < HYBRIS_HOME >/hybris/config/local.properties file

  1. website.powertools.http=http://powertools.local:9001/mystorestorefront
  2. website.powertools.https=https://powertools.local:9002/mystorestorefront
website.powertools.http=http://powertools.local:9001/mystorestorefront
website.powertools.https=https://powertools.local:9002/mystorestorefront

Step 12

Build & initialize Hybris Commerce by running the ant initialize from the < HYBRIS_BIN_DIR >/platform folder

Step 13

Start the Hybris server by running the following command from the “< HYBRIS_BIN_DIR >/platform” folder

On Windows :

  1. hybrisserver.bat
hybrisserver.bat


On Linux or Mac :

  1. ./hybrisserver.sh
./hybrisserver.sh

Step 14

Add the following entry in your computer’s hosts file

  1. 127.0.0.1   powertools.local
127.0.0.1   powertools.local

Step 15

Once the server is started, access B2B Accelerator powertools storefront

https://powertools.local:9002/mystorestorefront/powertools/en/USD.

storefront_b2b_recipe

About the Author

Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on