SAP Commerce – Merging of Two B2C Sites
The blog is about merging of two SAP Commerce B2C Storefronts into ONE, sounds strange right? Yes, it is. I hope this blog would help whoever is looking for some help in such unique situation. Will discuss more about technical aspects of merging 2 different sites into one, which broadly includes backend code and frontend UI code merging activities and taking care of all existing functionalities unaffected.
In this vast world anything is possible, likewise some time we need to divide one into many and merge many into one. In one of such scenarios and most recently, I got an opportunity to work on merging of two B2C sites into ONE site within a short time span. And again, please remember both the sites are B2C in nature and were live sites. As a part of re-branding of the entire site, the merging of 2 sites became necessity. Let’s see what is there in these 2 sites.
Site 1 – This was a public site for marketing purposes with no user authentication, user could browse entire site without any restrictions. Site included Product Catalog (with defined categories, products in it) and Content Catalog. Also, site introduces available Investments and opportunities as Products to End Users.
Site 2 – This site was public with restricted to registered user access. Customer login via two-phase authentication, the Customer would be given the access to site. Includes Product Catalog and Content Catalog, but Product catalog does not have any Categories and Products. This site was mainly used for everything related to Investors from Apply/Amend License for Investments, local Government approvals and Issue of documents like replacement of damaged Passport and Visa, etc. till Final Exit or Cancelation of License. It also helps to setup headquarters in their country. The site is integrated with SAP C4C, SAP CRM and SAP CPI.
Readers should have a very basic knowledge on SAP Commerce Platform and its better if reader has hands on experience on B2C Commerce applications.
The most challenging part of merging activity is to retain both site functionalities and bring them together as ONE unified portal. Here I have listed down few of those changes,
- URL Patten changing and connecting 2 sites with one URL.
- Data Model changes and moving them from one extension to another.
- Data importing of Products, Categories, and others.
- Composing unified Headers and Footers and WCMS components creating & importing.
- Retaining the UI styling unaffected and applying new styling on top of it.
Now, let’s start on merging/unification of two B2C Sites.
Merging of Two B2C Sites
I had two approaches for merger to begin with, they are,
Option 1 – Transfer one site functionality to another site.
Option 2 – Create altogether new B2C Accelerator and start adding both sites functionality to newly created storefront, like fresh start.
Considering limited timeline and revamp of the site was the main goal to achieve, I have decided to go with Option 1. That means, transfer the entire functionalities of one site to another site carefully to complete the merging. Here I will discuss about each step involved in transferring functionality from one site to another.
For sake of understandability lets name the site as below.
Site 1 – “IS” B2C site (Source site – There is no login and has Products and Categories)
Site 2 – “ES” B2C site (Target site – Login is must to access the site and has no Products and Categories)
After transferred the code and functionality of “IS” site to “ES” site, the ES site has got both functionalities of two sites. In details we can go through each step of transferring logic, code, and functionalities.
Step 1: Go through the functionalities and implementation of both site and this is very essential to start with merging, unless we study the nature and implementation of sites, we can’t really start anything. So, study hard, check for any extension dependencies, custom extensions, third-party integrations any and Add-ons installed for storefront extension.
Step 2: Accelerator Architecture in SAP Commerce as follows, similar way, transfer the functionalities as well from one site to another.
Above diagram depicts the dependency of the extensions in B2C accelerator. By following the defined hierarchy, transfer the code and logic from source to target extensions one after the another.
- Moving of XXXcore extension
Note: Initially, comment the “IS” related source extension reference in local.properties file, so it should not throw build error like code duplication exception while moving the code.
- Moving of XXXfacades extension
- Moving of XXXbackoffice extension
- Create new XXXinitialdata extension
Please check the possibility of reusing existing initialdata extension for data importing, in our case we were unable to use existing initialdata extension, so created a new extension, which is used solely for the data loading purpose.
- Moving XXXstorefront extension
Step 3: After moving code and configuration from source extension to target extension, please execute “ant clean all” again, make sure build is successful (if any error, do RCA to resolve) and then start the SAP Commerce server.
- After server starts up, scan the console log for any errors thrown.
- Login to HAC, do system update by selecting core extension.
- Select the newly create initialdata extension for loading of project specific contents like page creation, component creation and loading of Categories, Products, and any other data loading purposes.
- Complete the data importing and check for error if any.
- Click on Finish link once the System Update completes.
Step 4: Login to Backoffice and check for WCMS -> Website setting in Backoffice, if required do changes in URL pattern and other configurations. Later check for Solr Configuration and Index type configuration, do necessary changes and run the FULL index.
Step 5: Now, its testing time, access the URL and load pages. Hope the page loads successfully! Do Full testing on Product Catalog and Content Catalog and check the functionalities of the merged site.
Merging of two B2C site resulted with seamless experience for End Users and improved the site views, mainly achieved re-branding and globalizing the site with International Standards. Overall look and feel of the unified site improved tremendously along with site performance and usability, which made End Users happy browsing through site.
Refer B2C and B2B Accelerator and read about Commerce B2C Accelerator to know more about B2C Accelerator.
Refer SAP Commerce Community Page to learn more about SAP Commerce Cloud. Follow SAP Commerce Questions page to post and answer questions.
Thanks for reading!!! Please do share your feedback and comments.
Detailed blog..! Enjoyed reading Abhinethra.
Thanks Abhinethra, for such an informative Blog.
Excellent and well articulated blog. Keep up the good work !!