How to install B2B module in Magento 2?

Installing a B2B module in Magento 2 is a crucial step to enhance your e-commerce platform with features specifically designed for business-to-business interactions. The exact installation process can vary slightly depending on the module vendor and the method they recommend, but generally, there are two primary ways to install Magento 2 extensions: via Composer (the recommended method) and manually via FTP/SFTP.


This guide will walk you through both methods, with a focus on the Composer approach, which is generally more efficient and easier to manage.


Before You Begin:


  • Backup Your Magento 2 Store: It's always best practice to create a full backup of your Magento 2 store (both files and database) before installing any new extensions. This will allow you to easily revert to a previous state if any issues arise.
  • Ensure Compatibility: Verify that the B2B module you are installing is compatible with your Magento 2 version. This information is usually provided by the extension vendor.
  • Access to Your Magento 2 Server: You will need SSH access to your Magento 2 server for Composer installation and FTP/SFTP access for manual installation.
  • Extension Package: Ensure you have the extension package files from the vendor (usually a ZIP file or Composer instructions).


Before coming to the instructions, you can refer to the article: What is B2B in Magento 2

Method 1: Installation via Composer (Recommended)

Composer is a dependency management tool for PHP, and it's the preferred method for installing Magento 2 extensions as it handles dependencies and updates more effectively.


Steps:


Access Your Magento 2 Root Directory via SSH: Use an SSH client (like PuTTY on Windows or the built-in Terminal on macOS/Linux) to connect to your Magento 2 server. Navigate to the root directory of your Magento 2 installation.


Obtain Extension Package Information:The extension vendor (e.g., BSS Commerce) will typically provide you with the Composer package name and version for their B2B module. This information is usually found in the purchase confirmation email, installation guide, or your account on their website.


Add the Vendor Repository (If Necessary):Some vendors require you to add their repository to your Composer configuration. This is usually provided in the installation instructions. The command might look something like this (replace with the actual repository URL and authentication details if provided):Bashcomposer config repositories.<vendor_name> composer <repository_url>
You might also need to provide authentication details (username/password or access token) if the repository is private:Bashcomposer config http-basic.<repository_url> <username> <password_or_token>


Require the Extension using Composer:Use the composer require command followed by the extension's package name and version. For example, if the package name is bsscommerce/b2b-module and you want the latest stable version, the command would be:Bashcomposer require bsscommerce/b2b-module
If a specific version is required, you can specify it like this:Bashcomposer require bsscommerce/b2b-module:1.0.0
Composer will download and install the extension and its dependencies.


Enable the Extension:After Composer has finished, you need to enable the extension in Magento. Run the following command:Bashbin/magento module:enable Bsscommerce_B2bModule # Replace Bsscommerce_B2bModule with the actual module name(s)
You can find the exact module name(s) in the extension's documentation or in the registration.php file within the extension's directory (if you were to install manually).


Run Magento Setup Upgrade:This command registers the new module and updates the Magento database schema:Bashbin/magento setup:upgrade


Deploy Static Content:This step generates the static files (CSS, JavaScript, images) for your store:Bashbin/magento setup:static-content:deploy -f
If your store has multiple locales, you might need to specify them:Bashbin/magento setup:static-content:deploy <locale_code> -f


Clear Magento Cache:Finally, clear the Magento cache to ensure the changes are applied:Bashbin/magento cache:clean
bin/magento cache:flush

Method 2: Manual Installation via FTP/SFTP (Less Recommended)

This method involves directly uploading the extension files to your Magento 2 installation. It's generally less preferred due to the lack of dependency management.


Steps:


Download the Extension Package: Download the B2B module package (usually a ZIP file) from the vendor.


Unzip the Package:Extract the contents of the ZIP file on your local computer. You will typically find a folder structure containing the extension files.


Upload the Extension Folder: Using an FTP/SFTP client (like FileZilla or Cyberduck), connect to your Magento 2 server. Navigate to the app/code directory. If the code directory doesn't exist, create it.Create a new directory within app/code with the vendor name (e.g., Bsscommerce). Inside this vendor directory, create another directory with the module name (e.g., B2bModule). Upload the contents of the unzipped extension package into this module directory (app/code/Bsscommerce/B2bModule).


Enable the Extension:Connect to your server via SSH and navigate to the Magento 2 root directory. Run the following command to enable the module (replace Bsscommerce_B2bModule with the actual module name):Bashbin/magento module:enable Bsscommerce_B2bModule


Run Magento Setup Upgrade:Bashbin/magento setup:upgrade


Deploy Static Content:Bashbin/magento setup:static-content:deploy -f


Clear Magento Cache:Bashbin/magento cache:clean
bin/magento cache:flush


Important Considerations for BSS Commerce Extensions:

  • Refer to Official Documentation: BSS Commerce usually provides detailed installation guides specific to each of their extensions. Always prioritize following the instructions provided in the official documentation that comes with your purchased B2B module.
  • Check System Requirements: Ensure your Magento 2 installation meets the system requirements specified by BSS Commerce for their B2B module.
  • Installation Services: BSS Commerce might offer installation services for their extensions. If you are not comfortable with the installation process, consider contacting their support team for assistance.

After Installation:


Once the installation is complete, you should:

  • Log in to your Magento 2 Admin Panel.
  • Check if the B2B module is enabled: Navigate to Stores > Configuration > Advanced > Advanced. Look for the module name in the list. It should be enabled.
  • Configure the B2B module: Navigate to the relevant configuration sections in the Magento 2 admin panel to set up the B2B features according to your needs. The location of these settings will depend on the specific B2B module you installed.
  • Test the functionality thoroughly: Ensure all the B2B features are working as expected on the frontend and backend of your store.


By following these steps and referring to the specific installation guide provided by BSS Commerce for their B2B module, you should be able to successfully install the extension in your Magento 2 store and start leveraging its B2B capabilities.

About BSS Commerce

Are you looking for Magento extensions to enhance your store? We are here to help!

BSS Commerce branded ourselves around 3 keywords: SOLUTION ORIENTED, FEATURE RICH, and TRANSPARENCY. With over 10 years of experience, as a trusted Magento extension provider, we understand your pain points and develop over 150+ Magento 2 plugins to improve your store and increase your sales in all aspects.

JOIN MY MAILING LIST

BSS Commerce branded ourselves around 3 keywords: SOLUTION ORIENTED, FEATURE RICH, and TRANSPARENCY.

Newsletter

Subscribe now to get daily updates.

Created with © systeme.io