viraxpress/companyaccounts

ViraXpress Company Accounts Module for Magento 2

Maintainers

Package info

github.com/viraxpress/CompanyAccounts

Type:magento2-module

pkg:composer/viraxpress/companyaccounts

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-04-17 13:03 UTC

This package is auto-updated.

Last update: 2026-06-10 10:10:24 UTC


README

B2B Company Account Management for Magento 2
Enable corporate purchasing with sub-user management, role-based permissions, and approval workflows — all linked under a single parent company account.

Table of Contents

Overview

ViraXpress CompanyAccounts transforms your Magento 2 store into a full-featured B2B platform. Once a customer is approved as a Company Account, they become a Company Admin with the ability to:

  • Invite and manage sub-users under the same company umbrella
  • Define roles with fine-grained permissions
  • Control what each sub-user can see and do on the storefront
  • Ensure all orders placed by sub-users are automatically associated with the parent company account

This makes it easy for purchasing managers, buyers, and department heads to operate under one company — with full audit visibility and centralized order tracking.

Key Features

Company Registration & Approval

  • Customers can apply to register a company account from the storefront
  • Admin reviews and approves or rejects requests via the Magento backend
  • Email notifications are sent at every stage: registration, approval, rejection, and sub-user invitations
  • Approved companies are automatically mapped to a configured Customer Group

Company Dashboard

  • Dedicated dashboard for company admins to manage users, roles, and company details
  • Quick access to company orders, sub-user activity, and profile settings

Sub-User Management

  • Company admins can add, edit, and deactivate sub-users
  • Each sub-user is linked to the parent company account
  • All orders placed by sub-users are automatically created under the parent account for centralized tracking

Role & Permission Control

  • Company admins create custom roles with specific permission sets
  • Assign roles to individual sub-users
  • Permissions control access to storefront navigation tabs, ordering capabilities, and account sections
  • Sub-users only see the menu tabs and actions their role permits

Order Management & Approval Workflows

  • Direct Ordering: Certain roles can place orders immediately
  • Order for Approval: Sub-users with restricted access can submit orders that require admin approval before processing
  • Access All Company Orders: Roles can be granted visibility into all orders placed across the company
  • All sub-user orders are always linked back to the parent company account

Store View Restrictions

  • Company registration and features can be enabled per store view
  • Useful for multi-store setups with separate B2B and B2C storefronts

How It Works

Company Registration (Frontend)
        │
        ▼
Admin Review & Approval (Backend)
        │
        ▼
Company Account Created ──► Customer Group Assigned
        │
        ▼
Company Admin Logs In
        │
        ├──► Creates Roles & Assigns Permissions
        │
        └──► Invites Sub-Users ──► Sub-Users Assigned to Roles
                                          │
                                          ▼
                               Sub-User Places Order
                                          │
                                          ▼
                          Order Linked to Parent Company Account
                          (Approval workflow triggered if required)

Role & Permission System

The module ships with a structured permission tree. Company admins can mix and match permissions when creating custom roles.

Permission Tree

Category Permission
Account Overview Access Company Dashboard
Download Digital Purchases
Manage Wishlist Items
Address Management Manage Addresses
Payment Settings View Saved Payment Methods
User & Role Management Manage Sub-Users
Manage User Roles
View Sub-User Activity Logs
Order Processing Create and Submit Orders
Approve Orders Submitted by Others
Access All Company Orders
Direct Ordering Privilege

Navigation Tab Visibility

Storefront navigation tabs are dynamically shown or hidden based on the sub-user's assigned role. For example:

  • A sub-user without Access All Company Orders will not see the company orders menu item
  • A sub-user without Manage Sub-Users will not see the user management section
  • Sub-users are never shown the company admin controls

Installation

Requirements

  • Magento 2.4.x
  • PHP 8.x compatible

Via Composer

composer require viraxpress/companyaccounts

Enable & Deploy

php bin/magento module:enable ViraXpress_CompanyAccounts
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Frontend Behavior

For Company Admins

  • Access the full Company Dashboard from the customer account sidebar
  • Manage sub-users and roles under dedicated menu tabs
  • View all orders placed by any sub-user in the company
  • Edit company profile and addresses

For Sub-Users

  • See only the navigation tabs permitted by their assigned role
  • Place orders as themselves — all orders are automatically linked to the parent company
  • If the role requires approval, orders enter an approval queue rather than processing immediately
  • Sub-users cannot access or modify company settings, users, or roles unless explicitly permitted

Custom Labels for B2B Tabs

When a sub-user is part of a company, certain tabs are relabelled for B2B context:

  • My OrdersCompany Orders
  • My Downloadable ProductsCompany's Digital Purchases

Compatibility

Component Version
Magento Open Source / Commerce 2.4.x
PHP 8.1 / 8.2
ViraXpress Theme Recommended for full UI support

Support & License

Modifications to module files are discouraged to ensure seamless upgrades and compatibility with future releases. If you need to extend functionality, use Magento's standard plugin/preference/observer system in a separate custom module.

© 2026 ViraXpress. All rights reserved.