Installation & Setup

This guide walks you through installing and setting up the Sales Staff extension for Magento 2.

Prerequisites

Before installing, ensure you have:

  • Magento with magento/framework >=103.0.4
  • PHP ^8.1 with extensions: intl, iconv
  • Composer access to MageB2B repository
  • SSH/terminal access to your server
  • Backup of your database and files

Installation Steps

1. Install via Composer

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff:*

2. Enable the Module

php bin/magento module:enable MageB2B_Staff

3. Run Setup Upgrade

php bin/magento setup:upgrade

This creates the required database tables:

  • customer_salesstaff - Staff accounts
  • customer_salesstaff_customer - Staff-customer relationships
  • customer_salesstaff_group - Staff groups
  • Adds columns to sales_order, sales_order_grid, and quote

4. Compile DI

php bin/magento setup:di:compile

5. Deploy Static Content

php bin/magento setup:static-content:deploy

6. Clear Cache

php bin/magento cache:flush

Verify Installation

Check Module Status

php bin/magento module:status MageB2B_Staff

Expected output:

Module is enabled

Check Database Tables

php bin/magento setup:db:status

Expected tables:

  • customer_salesstaff
  • customer_salesstaff_customer
  • customer_salesstaff_group

Access Admin Configuration

Navigate to:

Stores >Configuration > MageB2B > Staff

If you see the configuration page, installation was successful!

Post-Installation Setup

1. Create Default Staff Group

Go to: Staff >Staff Groups

Click "Add New Group" and create:

  • Name: "Sales Representatives"
  • Save

2. Configure Basic Settings

Go to: Stores >Configuration > MageB2B > Staff > General

Set:

  • Session Lifetime: Default is 900 seconds (adjust as needed)
  • Can customer have multiple staff: Depends on your process (team-based vs. territory-based)
  • Default Staff Group: Sales Representatives

3. Configure Email Settings

Go to: Stores >Configuration > MageB2B > Staff > Email

Set:

  • Email template new staff: Staff New Account
  • Email template for staff activation: Staff Activated
  • Email template for staff de-activation: Staff Deactivated

Go to: Stores >Configuration > MageB2B > Staff > General

Set:

  • Add footer link for staff signup: Yes
  • Add footer link for staff login: Yes

This adds links to your store footer for staff registration and login.

Optional Add-Ons

Install optional add-ons for extended functionality: Reporting is included directly in the Staff core feature set.

Staff API

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-api:* php bin/magento module:enable MageB2B_StaffApi php bin/magento setup:upgrade php bin/magento cache:flush

Customer History

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-customerhistory:* php bin/magento module:enable MageB2B_StaffCustomerHistory php bin/magento setup:upgrade php bin/magento cache:flush

Customer Visits

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-customervisit:* php bin/magento module:enable MageB2B_StaffCustomerVisit php bin/magento setup:upgrade php bin/magento cache:flush

Order Management (Order Editing)

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-ordermanagement:* php bin/magento module:enable MageB2B_StaffOrderManagement php bin/magento setup:upgrade php bin/magento cache:flush

Quotes

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-quote:* php bin/magento module:enable MageB2B_StaffQuote php bin/magento setup:upgrade php bin/magento cache:flush

Import/Export

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-importexport:* php bin/magento module:enable MageB2B_StaffImportExport php bin/magento setup:upgrade php bin/magento cache:flush

Hyvä Compatibility

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-hyva:* php bin/magento module:enable MageB2B_StaffHyva php bin/magento setup:upgrade php bin/magento cache:flush

SAML Single Sign-On (SSO)

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-saml:* php bin/magento module:enable MageB2B_StaffSaml php bin/magento setup:upgrade php bin/magento cache:flush

Sample Data

For staging/dev environments:

Compatibility note: mageb2b/staff-sample-data currently requires PHP ~7.4|~8.0; staff-quote-sample-data depends on it.

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-sample-data:* php bin/magento module:enable MageB2B_StaffSampleData php bin/magento setup:upgrade php bin/magento cache:flush

If you installed the Staff Quote add-on and want demo quote data:

composer config bearer.repo.softwaresilo.io composer config repositories.softwaresilo composer https://repo.softwaresilo.io/ composer require mageb2b/staff-quote-sample-data:* php bin/magento module:enable MageB2B_StaffQuoteSampleData php bin/magento setup:upgrade php bin/magento cache:flush

Troubleshooting Installation

Module Not Showing in Admin

Problem: Configuration page not visible

Solution:

php bin/magento cache:flush php bin/magento setup:upgrade

Database Tables Not Created

Problem: Tables missing after setup:upgrade

Solution:

# Check module is enabled php bin/magento module:status MageB2B_Staff # Run setup again php bin/magento setup:upgrade --keep-generated

Permission Errors

Problem: Cannot write to directories

Solution:

# Set correct permissions chmod -R 755 var/ pub/static/ generated/ chown -R www-data:www-data var/ pub/static/ generated/

Uninstallation

If you need to remove the extension:

php bin/magento module:uninstall MageB2B_Staff

This will:

  • Remove the module code
  • Drop customer_salesstaff and customer_salesstaff_customer
  • Remove related staff attributes/entity data

Warning: This permanently deletes all staff accounts and data!

Next Steps

Now that the extension is installed, configure it for your needs:

Configuration Guide →

Found an issue with this documentation? Let us know