I need to have 2 accelerators, B2C and B2B, in the same project, both working like a separate module with different webroot. Is that possible ?
I have already working B2C accelerator with custom extensions in one module. What I'm trying to achieve is to create another module (used for B2B) that will have same capabilities to use custom extensions and have different storefront on different URL. I tried creating new customized B2B accelerator following this SAP tutorial and I got the correct structure of extensions generated, but then I got some error when using
ant clean all
, with duplicate attributes for fulfilmentprocess extension.
I tried to use b2b_acc recipe as well, but there it failed during ant modulegen
and the structure was not correctly generated.
What are my options here, is it possible to have 2 different modules for B2C and B2B, or I can have only B2B addon for B2C ? How to handle different storefronts on different URLs and some specific overrides for B2C and B2B ? Thanks for any advice.
is it possible to have 2 different modules for B2C and B2B?
Yes, you can have B2B & B2C running together. Use Hybris recipe to add that flavor to your site.
How to handle different storefronts on different URLs and some
specific overrides for B2C and B2B?
Generate another storefront using extgen and install B2B addons on it. You can maintain different URLs by setting the differnt webroot context.
1) Install the recipe b2c_b2b_acc
or which has both B2C & B2B. This helps you to configure the localextensions.xml with the require the extensions.
2) Run the modulegen with accelerator
template to generate a custom module. Here you will have a custom storefront extension which you can treat for B2C changes
3) Configure the generated custom storefront extension (Let's say B2CStorefront) as a template. Refer to this answer for the details steps.
4) Generate another storefront extension by using extgen. You can see your custom storefront extension in the template options, choose it and you will have another clone storefront extension. Let me say B2BStorefront.
5) Now install B2B addons as per your requirements. Like b2bacceleratoraddon, commerceorgaddon.
6) Configure website & media URL in both storefront extensions as per your requirements
7) Build & Initialize the system
If you follow the steps mentioned in the link (that you have shared) correctly, it will work without any issue. I can confirm this as I have done it multiple times (with different versions). The issue you have mentioned is because you might have missed removing/commenting yacceleratorfulfilmentproces
extension in the localextensions.xml. If you already have a ...fulfilmentprocess
extension (instead of yacceleratorfulfilmentproces
extension) created using modulegen earlier, you can keep that and do not include the newly generated ...fulfilmentprocess
extension.