PHPackages                             thelia/customer-family-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. thelia/customer-family-module

ActiveThelia-module[Utility &amp; Helpers](/categories/utility)

thelia/customer-family-module
=============================

For creating customer families

3.2.2(5mo ago)01.3k↓68.8%17[3 issues](https://github.com/thelia-modules/CustomerFamily/issues)[2 PRs](https://github.com/thelia-modules/CustomerFamily/pulls)LGPL-3.0+PHPCI passing

Since Feb 17Pushed 3w ago7 watchersCompare

[ Source](https://github.com/thelia-modules/CustomerFamily)[ Packagist](https://packagist.org/packages/thelia/customer-family-module)[ RSS](/packages/thelia-customer-family-module/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (1)Versions (53)Used By (0)

Customer Family
===============

[](#customer-family)

Create customer families (professional, private individual, ...) and manage specific prices.

Also allow to define purchase prices for products.

Compatibility
-------------

[](#compatibility)

```
Thelia >= 2.3.x

For use with lower version of Thelia look for older tags on this module.

```

Installation
------------

[](#installation)

### Manually

[](#manually)

- Copy the module into `/local/modules/CustomerFamily` directory and be sure that the name of the module is CustomerFamily.
- Activate it in your thelia administration panel

### Composer

[](#composer)

Add it in your main thelia composer.json file

```
composer require thelia/customer-family-module:~1.5.0

```

Usage
-----

[](#usage)

This module is visible in the BackOffice Customer Edit.

Use the first tab to create, edit or remove families. You can also define default family, use to show specific price to unlogged customers.

The second tab allows you to define how prices are calculated for each family, depending on the products purchase price.

Product's prices are automatically changed in the 'product' loop, you don't need to use 'customer\_family\_pse\_calculated\_prices' loop (see below) to get product's prices.

Loops
-----

[](#loops)

Use provided loops to display for example taxed or untaxed price depending on the customer's family.

### customer\_family

[](#customer_family)

This loop returns client families

#### Input arguments

[](#input-arguments)

ArgumentDescription**id**family id**exclude\_id**exclude family id**is\_default**filter default family#### Output values

[](#output-values)

ArgumentDescription**CUSTOMER\_FAMILY\_ID**customer family id**CODE**customer family code**TITLE\_CUSTOMER\_FAMILY**customer family title**IS\_DEFAULT**default customer family#### Example

[](#example)

```
{loop type="customer_family" name="customer_family_loop" current_product=$product_id limit="4"}
    {$CODE} ({$TITLE_CUSTOMER_FAMILY})
{/loop}

```

### customer\_customer\_family

[](#customer_customer_family)

This loop returns customer family for specific customer or inverse

#### Input arguments

[](#input-arguments-1)

ArgumentDescription**customer\_id**customer id**customer\_family\_id**family id**customer\_family\_code**family code#### Output values

[](#output-values-1)

ArgumentDescription**CUSTOMER\_FAMILY\_ID**customer family id**CUSTOMER\_ID**customer id#### Example

[](#example-1)

```
{loop type="customer_customer_family" name="customer_customer_family_loop" customer_id="4"}

{/loop}

```

### customer\_family\_price

[](#customer_family_price)

This loop returns the customer family's equation data

#### Input arguments

[](#input-arguments-2)

ArgumentDescription**customer\_family\_id**family id**promo**equation for the promo price or not**use\_equation**is the equation used to calculate price#### Output values

[](#output-values-2)

ArgumentDescription**CUSTOMER\_FAMILY\_ID**customer family id**PROMO**equation for the promo price or not**USE\_EQUATION**is the equation used to calculate price**AMOUNT\_ADDED\_BEFORE**amount directly added to the purchase price**AMOUNT\_ADDED\_AFTER**amount added to the purchase price after the multiplication**COEFFICIENT**coefficient the purchase price added to AMOUNT\_ADDED\_BEFORE is multiplied by**IS\_TAXED**are taxes applied on the final calculated price#### Example

[](#example-2)

```
{loop type="customer_family_price" name="customer_family_price_loop" customer_family_id=1 promo=0}
    {$AMOUNT_ADDED_BEFORE}
    ...
{/loop}

```

### customer\_family\_pse\_calculated\_prices

[](#customer_family_pse_calculated_prices)

This loop returns the PSE's calculated price based on the given customer family &amp; currency

#### Input arguments

[](#input-arguments-3)

ArgumentDescription**pse\_id***mandatory*, PSE id**currency\_id**currency id *(if not given, use default currency)***customer\_family\_id***mandatory*, customer family id#### Output values

[](#output-values-3)

ArgumentDescription**CALCULATED\_PRICE**customer family id**CALCULATED\_TAXED\_PRICE**equation for the promo price or not**CALCULATED\_PROMO\_PRICE**is the equation used to calculate price**CALCULATED\_TAXED\_PROMO\_PRICE**amount directly added to the purchase price#### Example

[](#example-3)

```
{loop type="customer_family_pse_calculated_prices" name="customer_family_pse_calculated_prices_loop" pse_id=22 customer_family_id=1}
    {$CALCULATED_TAXED_PRICE}
    ...
{/loop}

```

Form customer\_family\_customer\_create\_form
---------------------------------------------

[](#form-customer_family_customer_create_form)

This form extend customer\_create\_form

### Fields

[](#fields)

NameTypeRequired**customer\_family\_id**integertrueDefault
-------

[](#default)

By default, two families are created

- Private individual
- Professional

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance85

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~83 days

Recently: every ~107 days

Total

49

Last Release

155d ago

Major Versions

1.5.7 → 2.0.02022-06-23

2.0.4 → 3.0.02024-02-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2196919?v=4)[thelia](/maintainers/thelia)[@thelia](https://github.com/thelia)

---

Top Contributors

[![lopes-vincent](https://avatars.githubusercontent.com/u/6057206?v=4)](https://github.com/lopes-vincent "lopes-vincent (35 commits)")[![zawaze](https://avatars.githubusercontent.com/u/37273643?v=4)](https://github.com/zawaze "zawaze (9 commits)")[![gillesbourgeat](https://avatars.githubusercontent.com/u/7335734?v=4)](https://github.com/gillesbourgeat "gillesbourgeat (8 commits)")[![leanormandon](https://avatars.githubusercontent.com/u/30038624?v=4)](https://github.com/leanormandon "leanormandon (6 commits)")[![etiennePerriere](https://avatars.githubusercontent.com/u/1653754?v=4)](https://github.com/etiennePerriere "etiennePerriere (4 commits)")[![anoziere](https://avatars.githubusercontent.com/u/118798868?v=4)](https://github.com/anoziere "anoziere (2 commits)")[![julescournut](https://avatars.githubusercontent.com/u/26310511?v=4)](https://github.com/julescournut "julescournut (2 commits)")[![mdevaud](https://avatars.githubusercontent.com/u/15226493?v=4)](https://github.com/mdevaud "mdevaud (2 commits)")[![NicolasBarbey](https://avatars.githubusercontent.com/u/26166378?v=4)](https://github.com/NicolasBarbey "NicolasBarbey (1 commits)")[![Soldras](https://avatars.githubusercontent.com/u/11573385?v=4)](https://github.com/Soldras "Soldras (1 commits)")[![ThomasDaSilva](https://avatars.githubusercontent.com/u/97163246?v=4)](https://github.com/ThomasDaSilva "ThomasDaSilva (1 commits)")[![Yochima](https://avatars.githubusercontent.com/u/7498669?v=4)](https://github.com/Yochima "Yochima (1 commits)")[![BrunoPYT](https://avatars.githubusercontent.com/u/102578598?v=4)](https://github.com/BrunoPYT "BrunoPYT (1 commits)")

### Embed Badge

![Health badge](/badges/thelia-customer-family-module/health.svg)

```
[![Health](https://phpackages.com/badges/thelia-customer-family-module/health.svg)](https://phpackages.com/packages/thelia-customer-family-module)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
