sap-commerce-cloudb2b

Hybris - B2B addons for custom storefront website


We are working on custom B2B storefront which is in the same codebase as existing B2C storefront. We are using version 1811 now. So far we were using Powertools for presentation and testing purposes but now we are working on creating B2B base store and all relevant data from scratch. We got to the point, where B2B site is already working, but there are some missing CMS data, like links, pages and so on. Specifically we are missing My Company item for B2B admin user, or pages needed for secureportaladdon (SecureCustomerPortalSecuredLoginPage...).

Looking at the impex-es of the relevant addons, we can see that there are specific files for hybris demo websites (electronics, powertools), but how can we achieve proper installation of these addons for custom b2b storefront website ? Is there a way to install them, so needed CMS data (pages, links, components) are added also for custom website ?

Thanks in advance.


Solution

  • I solved specified problem for now by including impex-es used in mentioned addons (secureportal, commerceorg) into custom initial data module that I created for initializing new B2B store with relevant data.

    Specifically there are cms-content.impex files in ext-addon/${addonName}/... that create needed content data. I had to change name for the contentCatalog and also for commerceorg there is reference to main navigation node with name specific for a content catalog. It is PowertoolsNavNode for powertools and you have to rename it based on your setup. After that, you can import those impex-es manually in HAC, or create initialdata module and edit SampleDataImportService to automate the process - using update in HAC.

    This solution applies for all other addons that need to import additional content data, but depending on amount and complexity of the data, it can require more changes to existing impex files. If there is a way to handle this purely by some hybris install procedure, then that would be recommended.