shopper / customer-groups
Customer groups for Shopper: segment customers and target discounts and price lists by group
v1.0.0
2026-09-25 17:39 UTC
Requires
- php: ^8.3
- shopper/framework: ^3.0.0-rc.2
- spatie/laravel-package-tools: ^1.15
Requires (Dev)
- larastan/larastan: ^3.10
- laravel/pint: ^1.29
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^4.4
- pestphp/pest-plugin-laravel: ^4.1
- pestphp/pest-plugin-livewire: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Customer segmentation for Shopper: group your customers and target promotions by group, directly from the admin panel.
Features
- Customer groups create, edit and toggle groups from the admin, under Customers.
- Members management browse a group's members in a slide-over, add customers through the shared customer picker, remove them one by one or in bulk, and jump to a customer profile.
- Discount eligibility reserve a promotion for one or more groups. The rule plugs into Shopper's discount eligibility registry, so validation, persistence and the admin form all work without patching the core.
- API ready groups carry a public ULID identifier, ready to be exposed through the Store API.
Requirements
- PHP
8.3+ - Laravel
12.xor13.x - Shopper
3.x
Installation
Require the package:
composer require shopper/customer-groups
Run the migrations:
php artisan migrate
Register the addon in your AppServiceProvider::register():
use Shopper\CustomerGroups\CustomerGroupsAddon; use Shopper\Facades\Shopper; Shopper::addons([ new CustomerGroupsAddon, ]);
A Groups entry appears in the sidebar under Customers, and a Specific groups option is available in the discount eligibility settings.
Extending
The Livewire components can be replaced with your own:
Shopper::addons([ (new CustomerGroupsAddon)->usingLivewireComponents([ 'customer-groups.index' => App\Livewire\CustomerGroupList::class, ]), ]);
License
Customer Groups is open-sourced software licensed under the MIT license.