Common Issues and Solutions

This guide covers the most common issues with the Sales Staff extension and how to resolve them.

Installation & Setup Issues

Module Not Showing in Admin

Symptom: Configuration page not visible after installation

Possible Causes:

  1. Module not enabled
  2. Cache not cleared
  3. Permissions issue

Solution:

# Check module status php bin/magento module:status MageB2B_Staff # Enable if needed php bin/magento module:enable MageB2B_Staff # Run setup php bin/magento setup:upgrade # Clear cache php bin/magento cache:flush # Check admin permissions # Admin > System > User Roles > Edit Role # Ensure "MageB2B Staff" permissions are enabled

Database Tables Not Created

Symptom: Tables missing after setup:upgrade

Check:

php bin/magento setup:db:status

Expected Tables:

  • customer_salesstaff
  • customer_salesstaff_customer
  • customer_salesstaff_group

Solution:

# Run setup with keep-generated flag php bin/magento setup:upgrade --keep-generated # If still missing, check logs tail -f var/log/system.log tail -f var/log/exception.log

Login Issues

Staff Cannot Login

Symptom: Login fails with correct credentials

Check:

  1. Staff Status: Must be "Active"

    • Admin >Staff > All Staff
    • Edit staff, check Status field
  2. Email Correct: Verify email address

    • Check for typos
    • Check for extra spaces
  3. Password Correct: Case-sensitive

    • Try password reset
  4. Website and Scope Context:

    • Check the staff website assignment and effective configuration scope
  5. Session Configuration:

    # Check session storage php bin/magento config:show web/cookie/cookie_domain php bin/magento config:show web/cookie/cookie_path

Solution:

# Reset password 1. Go to staff login page 2. Click "Forgot Password" 3. Enter email 4. Check email for reset link 5. Set new password

Login Redirects to Wrong Page

Symptom: After login, redirected to unexpected page

Check Configuration:

  • Stores >Configuration > MageB2B > Staff > General
  • Login post url handle: Check value

Default: staff

Solution: Set correct redirect URL

Session Expires Too Quickly

Symptom: Staff logged out after short time

Check Configuration:

  • Stores >Configuration > MageB2B > Staff > General
  • Session lifetime (seconds): Current value

Recommendation:

  • Minimum: 3600 (1 hour)
  • Recommended: 7200 (2 hours)
  • Maximum: 31536000 (1 year)

Solution: Increase session lifetime

Customer Assignment Issues

Customer Not Visible to Staff

Symptom: Staff cannot see assigned customer

Check:

  1. Customer Assigned:

    • Admin >Staff > All Staff > Edit Staff
    • Check "Customers" section
  2. Access All Customers:

    • Edit staff
    • Check "Access All Customers" field
  3. Customer Group Restrictions:

    • Stores >Configuration > MageB2B > Staff > General
    • Check "Restrict customer groups"
  4. Scope and Website Context:

    • In multi-website setups, check website and scope configuration for staff visibility
  5. Customer Status:

    • Customer account must be active

Solution:

Option A: Assign customer to staff Option B: Enable "Access All Customers" Option C: Remove customer group restrictions Option D: Verify scope/website configuration

Cannot Assign Customer to Staff

Symptom: Assignment fails or customer not found

Check:

  1. Customer Exists: Verify customer account
  2. Staff Active: Staff status must be Active
  3. Scope and Website Context: Verify assignment and configuration scope in multi-website setups
  4. Multiple Staff Setting:
    • If "Can customer have multiple staff" = No
    • Customer may already be assigned

Solution:

1. Verify customer exists 2. Activate staff account 3. Check scope and website settings 4. Enable multiple staff per customer (if needed)

Customer Assigned But Not Showing

Symptom: Assignment saved but customer not in list

Check:

  1. Show Customers by Default:

    • Configuration setting
    • May need to search first
  2. Cache Issue:

    php bin/magento cache:flush

Solution: Clear cache and refresh page

Customer Impersonation Issues

Cannot Start Customer Context

Symptom: Customer login action not working

Check:

  1. Customer Assigned: Verify assignment
  2. Staff Permissions: Check "Access All Customers" or specific assignment
  3. Customer Active: Customer account must be active
  4. Scope and Website Context: Check scope restrictions for customer visibility/impersonation
  5. Staff Active: Staff status must be Active

Solution:

1. Verify customer assignment 2. Check staff permissions 3. Activate customer account 4. Verify scope and website configuration

Session Lost During Impersonation

Symptom: Staff session expires while impersonating

Cause: Session lifetime too short

Solution:

  • Increase session lifetime
  • Stores >Configuration > MageB2B > Staff > General
  • Set to 7200 (2 hours) or more

Cannot Exit Customer Context

Symptom: "Logout from current customer" action not working

Check:

  1. Browser Cookies: Ensure cookies enabled
  2. Session Storage: Check session configuration
  3. Cache: Clear browser cache

Solution:

1. Clear browser cache and cookies 2. Close browser and reopen 3. Login as staff again 4. Try impersonation again

Price Editing Not Available

Symptom: Cannot edit cart item prices

Check:

  1. Staff Permission:

    • Edit staff account
    • "Can Edit Item Price" must be Yes
  2. System Configuration:

    • Stores >Configuration > MageB2B > Staff > General
    • Check price editing settings
  3. Product Type:

    • Some product types may not support price editing

Solution: Enable price editing in staff account and configuration

Commission Issues

Commission Not Calculated

Symptom: Order placed but commission shows $0.00

Check:

  1. Staff Commission Rate:

    • Edit staff account
    • "Commission" field must be >0
  2. Commission Type:

    • Stores >Configuration > MageB2B > Staff > Commission
    • "Commission type" must be selected
  3. Order Status:

    • Canceled orders have $0 commission
  4. Staff Assignment:

    • Order must be assigned to staff

Solution:

1. Edit staff, set Commission (e.g., 5.00) 2. Configure commission type 3. Verify order is not canceled 4. Check staff assignment on order

Wrong Commission Amount

Symptom: Commission calculated incorrectly

Check:

  1. Commission Type:

    • Total excluding tax
    • Total including tax
    • Product discount
  2. Staff Commission: Verify percentage

  3. Order Totals: Check subtotal, tax, shipping

  4. Calculation:

    Excl. Tax: Subtotal × Commission % Incl. Tax: Subtotal including tax × Commission % Discount: Sum of discounts

Solution: Verify commission type and percentage, manually adjust if needed

Commission Not Visible to Staff

Symptom: Staff cannot see commission in dashboard

Check Configuration:

  • Stores >Configuration > MageB2B > Staff > Commission
  • Show commission for Staff: Must be Yes

Solution: Enable commission display

Commission Not Updated After Order Change

Symptom: Order edited but commission unchanged

Cause: Commission is recalculated when the order is saved; canceled orders are forced to 0.

Solution:

  1. Open the order in admin and save it to trigger recalculation
  2. Verify the order is not canceled
  3. Verify commission configuration and staff commission value
  4. Check order history/comments for recalculation events

Email Issues

Staff Not Receiving Emails

Symptom: No emails sent to staff

Check:

  1. Email Templates Enabled:

    • Stores >Configuration > MageB2B > Staff > Email
    • "Activated Emails" setting
  2. Email Configuration:

    • Stores >Configuration > General > Store Email Addresses
    • Verify sender addresses
  3. SMTP Settings:

    • Check Magento email configuration
    • Test email sending
  4. Staff Email Address:

    • Verify correct email in staff account

Solution:

1. Enable email templates 2. Configure SMTP settings 3. Send a real test flow (e.g., password reset or staff activation email) 4. Check spam folder

Customer Not Receiving Order Confirmation

Symptom: Customer doesn't get order email

Check:

  1. Email Order To Setting:

    • Stores >Configuration > MageB2B > Staff > Email
    • "Email order to": Customer, Staff, Customer and Staff, Customer from quote and Staff, or Staff from quote and Customer
  2. Customer Email: Verify customer email address

  3. Email Processing:

    • Verify cron/queue consumers are running for asynchronous emails
    • Check logs for transport or template errors

Solution: Set "Email order to" to the intended recipient strategy for your order flow

Wrong Email Template Used

Symptom: Email content incorrect

Check:

  • Stores >Configuration > MageB2B > Staff > Email
  • Verify template selections:
    • Email template new staff
    • Email template for staff activation
    • Email template for staff de-activation
    • Forgot password template
    • Password updated template

Solution: Select correct templates and save configuration

Performance Issues

Slow Customer Grid Loading

Symptom: "Customers" page loads slowly

Causes:

  1. Too many customers assigned
  2. Complex filters enabled
  3. Show customers by default = Yes

Solutions:

Option A: Disable Default Display

  • Configuration: "Show customers by default" = No
  • Customers only load after search

Option B: Enable Address Filters

  • "Filter default billing address only" = Yes
  • "Filter default shipping address only" = Yes
  • Improves query performance

Option C: Reduce Filters

  • Configuration: "Search filters for customer grid"
  • Disable unused filters

Option D: Enable Pagination

  • "Enable limiter on Customer Grid" = Yes
  • Staff can choose records per page

Slow Order Placement

Symptom: Checkout takes long time

Causes:

  1. Commission calculation complex
  2. Email sending delays
  3. Database queries slow

Solutions:

1. Optimize database indexes 2. Use queue for emails 3. Enable caching 4. Check server resources

Database Issues

Duplicate Entry Error

Symptom: Error when assigning customer

Typical Error Pattern:

  • Integrity/duplicate assignment error while linking customer and staff

Cause: Customer already assigned to staff

Solution:

Option A: Enable "Can customer have multiple staff" Option B: Remove existing assignment first Option C: Check for duplicate assignments

Foreign Key Constraint Error

Symptom: Cannot delete staff or customer

Typical Error Pattern:

  • Delete/update blocked because related records still exist

Cause: Related records exist

Solution:

1. Remove customer assignments first 2. Then delete staff account 3. If error 1451 persists, check for custom/external constraints or integrations blocking deletion 4. Core customer-staff assignment relations use cascade behavior

Frontend Display Issues

Symptom: Login/signup links missing

Check Configuration:

  • Stores >Configuration > MageB2B > Staff > General
  • Add footer link for staff signup: Yes
  • Add footer link for staff login: Yes

Solution: Enable footer links and clear cache

Staff Account Menu Not Visible in Header (Custom Themes)

Symptom: Staff account details and logout are missing from the header, but appear on the staff dashboard.

Cause: The Staff header menu is rendered into the standard Magento container header.panel. Many custom themes remove or replace header.panel, so the Staff header block has no place to render.

Fix:

  1. Restore header.panel in the theme, or
  2. Attach the Staff header block to the actual header container used by the theme.

If your theme does not use header.panel, map the staff account header output to the container that renders your header links (for example header.container, header-wrapper, or a custom container from your theme layout).

Staff Dashboard Empty

Symptom: No data in staff dashboard

Causes:

  1. No customers assigned
  2. No orders placed
  3. Commission display disabled

Solution:

1. Assign customers to staff 2. Place test order 3. Enable commission display 4. Clear cache

Getting Help

Enable Debug Mode

Configuration:

# Enable developer mode php bin/magento deploy:mode:set developer # Enable logging php bin/magento config:set dev/debug/template_hints_storefront 1

Check Logs

Log Files:

# System log tail -f var/log/system.log # Exception log tail -f var/log/exception.log # Debug log tail -f var/log/debug.log # Apache/Nginx error log tail -f /var/log/apache2/error.log tail -f /var/log/nginx/error.log

Collect Information

When reporting issues, include:

  • Magento version
  • Staff extension version
  • PHP version
  • Error messages from logs
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots (if applicable)

Preventive Measures

Regular Maintenance

Weekly:

  • Review staff accounts
  • Check commission calculations
  • Monitor email delivery
  • Review customer assignments

Monthly:

  • Update extension
  • Review configuration
  • Optimize database
  • Check performance

Quarterly:

  • Audit staff permissions
  • Review commission structure
  • Update documentation
  • Train new staff

Best Practices

Security:

  • Strong passwords
  • Regular password changes
  • Deactivate departed staff immediately
  • Monitor login attempts

Performance:

  • Optimize customer assignments
  • Use appropriate filters
  • Enable caching
  • Monitor server resources

Data Quality:

  • Verify customer assignments
  • Check commission accuracy
  • Validate email addresses
  • Clean up old data

Next Steps

For more detailed information, see:

Configuration Guide →Customer Assignment →Commission System →

Found an issue with this documentation? Let us know