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:
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:
After Installation:
Once the installation is complete, you should:
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
Created with © systeme.io