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:
- Module not enabled
- Cache not cleared
- 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 enabledDatabase Tables Not Created
Symptom: Tables missing after setup:upgrade
Check:
php bin/magento setup:db:statusExpected 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.logLogin Issues
Staff Cannot Login
Symptom: Login fails with correct credentials
Check:
Staff Status: Must be "Active"
- Admin >Staff > All Staff
- Edit staff, check Status field
Email Correct: Verify email address
- Check for typos
- Check for extra spaces
Password Correct: Case-sensitive
- Try password reset
Website and Scope Context:
- Check the staff website assignment and effective configuration scope
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 passwordLogin 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:
Customer Assigned:
- Admin >Staff > All Staff > Edit Staff
- Check "Customers" section
Access All Customers:
- Edit staff
- Check "Access All Customers" field
Customer Group Restrictions:
- Stores >Configuration > MageB2B > Staff > General
- Check "Restrict customer groups"
Scope and Website Context:
- In multi-website setups, check website and scope configuration for staff visibility
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 configurationCannot Assign Customer to Staff
Symptom: Assignment fails or customer not found
Check:
- Customer Exists: Verify customer account
- Staff Active: Staff status must be Active
- Scope and Website Context: Verify assignment and configuration scope in multi-website setups
- 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:
Show Customers by Default:
- Configuration setting
- May need to search first
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:
- Customer Assigned: Verify assignment
- Staff Permissions: Check "Access All Customers" or specific assignment
- Customer Active: Customer account must be active
- Scope and Website Context: Check scope restrictions for customer visibility/impersonation
- 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 configurationSession 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:
- Browser Cookies: Ensure cookies enabled
- Session Storage: Check session configuration
- Cache: Clear browser cache
Solution:
1. Clear browser cache and cookies 2. Close browser and reopen 3. Login as staff again 4. Try impersonation againPrice Editing Not Available
Symptom: Cannot edit cart item prices
Check:
Staff Permission:
- Edit staff account
- "Can Edit Item Price" must be Yes
System Configuration:
- Stores >Configuration > MageB2B > Staff > General
- Check price editing settings
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:
Staff Commission Rate:
- Edit staff account
- "Commission" field must be >0
Commission Type:
- Stores >Configuration > MageB2B > Staff > Commission
- "Commission type" must be selected
Order Status:
- Canceled orders have $0 commission
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 orderWrong Commission Amount
Symptom: Commission calculated incorrectly
Check:
Commission Type:
- Total excluding tax
- Total including tax
- Product discount
Staff Commission: Verify percentage
Order Totals: Check subtotal, tax, shipping
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:
- Open the order in admin and save it to trigger recalculation
- Verify the order is not canceled
- Verify commission configuration and staff commission value
- Check order history/comments for recalculation events
Email Issues
Staff Not Receiving Emails
Symptom: No emails sent to staff
Check:
Email Templates Enabled:
- Stores >Configuration > MageB2B > Staff > Email
- "Activated Emails" setting
Email Configuration:
- Stores >Configuration > General > Store Email Addresses
- Verify sender addresses
SMTP Settings:
- Check Magento email configuration
- Test email sending
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 folderCustomer Not Receiving Order Confirmation
Symptom: Customer doesn't get order email
Check:
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
Customer Email: Verify customer email address
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:
- Too many customers assigned
- Complex filters enabled
- 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:
- Commission calculation complex
- Email sending delays
- Database queries slow
Solutions:
1. Optimize database indexes 2. Use queue for emails 3. Enable caching 4. Check server resourcesDatabase 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 assignmentsForeign 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 behaviorFrontend Display Issues
Staff Links Not Showing in Footer
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:
- Restore
header.panelin the theme, or - 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:
- No customers assigned
- No orders placed
- Commission display disabled
Solution:
1. Assign customers to staff 2. Place test order 3. Enable commission display 4. Clear cacheGetting 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 1Check 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.logCollect 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 →
