B2B features
Since version 2.11
Front-Commerce supports several Magento2 B2B features. This guide explains how to configure and use the B2B module.
Here is the list of currently supported features:
- Display details of the Company a customer belongs to
- Company users handling (list, create, modify and deactivate company users)
- Payment on account payment method
- Display company credit history
- Requisition list
- Negotiable quotes (require Adobe Commerce 2.4.5+)
Those features are only available with Adobe Commerce and its B2B module and requires at least Adobe Commerce 2.4.3.
Enable B2B support
Requirements
On Magento2 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
We recommend to use a specific version of this module and not to blindly rely on the latest version.
Front-Commerce configuration
To leverage those features, you need to enable and integrate the Magento2 B2B module. Here is how to do it:
-
You need to enable the module in your
.front-commerce.js
:.front-commerce.jsdiff --git a/.front-commerce.js b/.front-commerce.js
index d607e0c..93ae34d 100644
--- a/.front-commerce.js
+++ b/.front-commerce.js
@@ -3,6 +3,7 @@ module.exports = {
url: "http://localhost:4000",
modules: [
"./node_modules/front-commerce/modules/datasource-elasticsearch",
+ "./node_modules/front-commerce/modules/front-commerce-b2b",
"./node_modules/front-commerce/theme-chocolatine",
"./src",
],
@@ -13,10 +14,16 @@ module.exports = {
path: "datasource-elasticsearch/server/modules/magento2-elasticsearch",
},
{ name: "Magento2", path: "server/modules/magento2" },
+ { name: "Magento2B2B", path: "front-commerce-b2b/server/modules/magento2" },
],
webModules: [
{ name: "FrontCommerce", path: "front-commerce/src/web" },
{ name: "ThemeChocolatine", path: "front-commerce/theme-chocolatine/web" },
+ {
+ name: "FrontCommerceB2B",
+ path: "front-commerce/modules/front-commerce-b2b/web",
+ },
+
{ name: "Skeleton", path: "./src/web" },
],
}; -
The web module provides a SCSS file that needs to be imported. To do that, you can create an override of
main.scss
containing the following code:src/web/theme/main.scss@import "~front-commerce/theme-chocolatine/web/theme/main";
/*
if you use the default theme as a base theme, you should use:
@import "~front-commerce/src/web/theme/main.scss";
*/
@import "~theme/b2b";
And that's it. After having restarted Front-Commerce, the B2B module should be enabled and integrated into your project. If you login as a company user and then go to the user account dashboard, you should see new B2B specific menu entries (company management, credit history…).
To enable Payment on account payment method, please refer to the Payment on account guide.
Negotiable quotes
Since version 2.23
In order to use Front-Commerce's Negotiable quotes module, you will need to enable the feature in your Magento back office. Please note that you'll need an Adobe Commerce B2B version >= 2.4.5.
Navigate to Stores > Configuration > General > B2B Features
, and set both
Enable Company
and Enable B2B quote
to Yes
.
Quotes also have to be enabled per-company. To do so, navigate to a company's
settings (Customers > Companies
, then open a company), and under
Advanced settings
switch Allow Quotes
on.
Negotiable quotes are only available to users that have a Company with Quotes enabled. More in Adobe documentation.
That's it, you should now be able to use Adobe Commerce's Negotiable quotes with Front-Commerce!
Known issues
This module has been fully implemented with Adobe Commerce's GraphQL API (version 2.4.5). Unfortunately, this means it is also limited to what the API exposes, thus some of the features available in Adobe Commerce's native frontend could not be tackled yet:
Advanced shipping methods and online payments aren't fully supported
In its current state, Front-Commerce's module only supports shipping methods without additional information to provide for customers.
The negotiable quote checkout fully supports offline payments such as payment on account, check/money or bank transfer. It only has a partial support for online payments and requires the Magento 2 B2B Front-Commerce module in version >= 1.2.0. Stripe is the only supported payment method (since version 2.25.0): please refer to Stripe's documentation page to enable this feature.
Please contact us if you have a specific requirement.
Negotiable quotes minimum price is not enforced nor exposed in the GraphQL API
Front-Commerce's module allow the creation of negotiable quotes from any amount, regardless of the settings in Magento.
Negotiable quotes GraphQL API does not support file-related features
File upload and download in negotiable quote comments are not available in Front-Commerce.
"Catalog" total prices is not exposed in negotiable quotes
The GraphQL API only exposes the quote's total price with applied discounts from the sales representative, so the catalog prices cannot be easily displayed.
Magento does not expose quote owners' user ID
For this reason, Front-Commerce compares first and last names of a user to detect ownership. Please note it could lead to subtle edge cases for homonyms in the same company, where a non-owner could see additional UI components without being able to act on them.
Front-Commerce does not take into account per-company feature deactivation
We do support the global B2B feature toggle and honor user permissions attached to company roles. However, Front-Commerce doesn't support the per-company feature deactivation.
The reason is because the information isn't exposed in Magento's API, and company ACLs don't change depending on this option.
As a consequence, it is possible that some users belonging to a company with negotiable quote deactivated (on a shop with the feature globally active) will view some negotiable quotes UI.