beself / magento2-module-customer-enhancements
Magento 2 module that adds a B2B flag to customer groups and a favorite product type attribute for customers.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: >=8.1
- magento/framework: 103.0.*
This package is not auto-updated.
Last update: 2025-09-09 05:26:13 UTC
README
Overview
Magento 2 module that extends Customer and Customer Group entities with additional attributes, admin grid visibility, configuration-driven options, and frontend display.
Features
-
Customer Group
- Adds a new column
is_b2b
(Yes/No) to distinguish B2B (distributor/wholesaler) groups. - Editable in the Customer Group form.
- Displayed in the Customer Groups grid with Yes/No labels.
- Adds a new column
-
Customer Attribute
- Adds a new attribute
favorite_product_type
. - Type:
select
field. - Options are managed from Stores → Configuration → Customers → Favorite Product Types.
- Options can be entered as comma-separated or multi-line values.
- Editable in Customer form.
- Visible in Customers grid.
- Adds a new attribute
-
System Configuration
- New group Favorite Product Types under
Stores > Configuration > Customers > Customer Configuration
. - Textarea field to define product types separated by commas.
- frontend validation prevents invalid formats.
- Configurable options are used by the customer attribute source model.
- New group Favorite Product Types under
-
Frontend (Customer Account)
- Dashboard block "Additional Information" displays:
- Whether the logged-in customer belongs to a B2B group.
- The customer’s favorite product type.
- Dashboard block "Additional Information" displays:
Installation
Via Composer
- Run the following commands in your Magento root directory:
composer require beself/magento2-module-customer-enhancements bin/magento module:enable Beself_CustomerEnhancements bin/magento setup:upgrade
Manual Installation
- Create the directory:
app/code/Beself/CustomerEnhancements
- Download and extract the module contents into the directory
- Run the following commands:
bin/magento module:enable Beself_CustomerEnhancements bin/magento setup:upgrade
Usage
Admin
-
Customer Groups
- Edit a group → toggle Is B2B.
- Column visible in the groups grid.
-
Customers
- Edit customer → choose Favorite Product Type.
- Column visible in the customers grid.
-
Configuration
- Navigate to
Stores → Configuration → Customers → Customer Configuration -> Favorite Product Types
. - Enter values separated by commas or new lines (e.g.):
Cardio equipment, Weight training equipment, Yoga and Pilates
- Navigate to
Frontend
- Customer logs in →
My Account → Dashboard
:- Additional Information box shows B2B status and favorite product type.
Requirements
Software | Version |
---|---|
Magento | 2.4.6 |
PHP | 8.1.27 |
License
This module is licensed under the MIT License.