Skip to main content
Version: 3.x

Adobe B2B

This extension contains the connector to use Front-Commerce with a headless Adobe Commerce B2B backend.

Prerequisites

  1. On Magento 2 side, you need to install the Front-Commerce Magento2 Commerce module.

    You must then install the front-commerce/magento2-b2b-module-front-commerce module:

    composer config repositories.front-commerce-magento2-b2b git \
    git@gitlab.blackswift.cloud:front-commerce/magento2-b2b-module-front-commerce.git
    composer require front-commerce/magento2-b2b-module

    bin/magento setup:upgrade
    tip

    We recommend to use a specific version of this module and not to blindly rely on the latest version.

  2. On Front-Commerce side, you need to setup and install the @front-commerce/magento2 extension

Installation

First ensure you have installed the package:

$ pnpm add @front-commerce/adobe-b2b@latest

Setup Adobe B2B Extension

Update your front-commerce.config.ts to include the Adobe B2B Extension :

front-commerce.config.ts
import { defineConfig } from "@front-commerce/core/config";
import themeChocolatine from "@front-commerce/theme-chocolatine";
import magento2 from "@front-commerce/magento2";
import adobeB2B from "@front-commerce/adobe-b2b";
import storesConfig from "./app/config/stores";
import cacheConfig from "./app/config/caching";

export default defineConfig({
extensions: [
themeChocolatine(),
magento2({ storesConfig }),
adobeB2B(),
],
stores: storesConfig,
cache: cacheConfig,
});

Feature Flags

The Adobe B2B extension supports the following feature flags: Click to expand.
  • Cart (default: true) - Enable the Cart feature
  • Company (default: true) - Enable the Company feature
  • CompanyStructure (default: true) - Enable the CompanyStructure feature
  • NegotiableQuotes (default: true) - Enable the NegotiableQuotes feature
  • RequisitionList (default: true) - Enable the RequisitionList feature
    • ⚠️ Requires component overrides
  • StoreCredit (default: true) - Enable the StoreCredit feature

All these features are active by default. To disable a feature you should return a falsy value for the feature flag in your extension options:

front-commerce.config.ts
import { defineConfig } from "@front-commerce/core/config";
import themeChocolatine from "@front-commerce/theme-chocolatine";
import magento2 from "@front-commerce/magento2";
import adobeB2B from "@front-commerce/adobe-b2b";
import storesConfig from "./app/config/stores";
import cacheConfig from "./app/config/caching";


export default defineConfig({
extensions: [
magento2({ storesConfig }),
adobeB2B({
features: {
Company: false, // Company feature will be disabled
NegotiableQuotes: false, // NegotiableQuotes feature will be disabled
RequisitionList: false, // RequisitionList feature will be disabled
// all other features will be enabled by default
},
}),
themeChocolatine(),
],
stores: storesConfig,
cache: cacheConfig,
configuration: {
providers: [],
},
});
tip

If a feature is not defined in the feature flags, it will be enabled by default.

caution

The RequisitionList feature requires some component overrides as the graphql documents will no longer be available if this feature is disabled