Enable the B2B module

If your customers are companies, you can install the B2B for Adobe Commerce module to extend your Adobe Commerce on cloud infrastructure Pro project to accommodate a business-to-business model. Although this topic provides information specific to installing and configuring the B2B module for Adobe Commerce on cloud infrastructure, you can find additional B2B information in the following guides:

Because B2B is a module for Adobe Commerce on cloud infrastructure, Adobe recommends that you deploy your Adobe Commerce application to an Integration or Staging environment before beginning.

Install B2B module

Adobe recommends working in a development branch when adding the B2B module to your project. If you do not have a branch, see Create a branch for development. When installing the B2B module, the Magento_B2b module name is automatically inserted in the app/etc/config.php file. There is no need to edit the file directly.

To install the B2B module:

  1. On your local workstation, change to your project directory.

  2. Create or check out a development branch.

  3. Add the B2B module to the require section of the composer.json file.

    code language-bash
    composer require magento/extension-b2b --no-update
  4. Update the project dependencies.

    code language-bash
    composer update
  5. Add, commit, and push code changes.

    code language-bash
    git add -A
    code language-bash
    git commit -m "Install the B2B module."
    code language-bash
    git push origin <branch-name>
  6. After the build and deploy finishes, use SSH to log in to the remote environment and verify that the B2B module installed.

    code language-bash
    bin/magento module:status Magento_B2b

    An extension name uses the format: <VendorName>_<ComponentName>.

    Sample response:

    code language-terminal
    Magento_B2b : Module is enabled

    If you encounter deployment errors, see Recover from component failure.

Enable the B2B module

When you install the B2B module using Composer, the deployment process automatically enables the module. If you already have the B2B module installed, you can enable or disable the module using the CLI

Enable the B2B module:

bin/magento module:enable Magento_B2b

Sample response:

The following modules have been enabled:
- Magento_B2b

Cache cleared successfully.
Generated classes cleared successfully. Please run the 'setup:di:compile' command to generate classes.
Info: Some modules might require static view files to be cleared. To do this, run 'module:enable' with the --clear-static-content option to clear them.

See Manage extensions.

Configure the B2B module

After installing the B2B for Adobe Commerce module, you must start the message consumers so that you can enable the Shared Catalog module, and you must enable the B2B features.