PHPackages                             thelia/custom-fields-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. thelia/custom-fields-module

ActiveThelia-module

thelia/custom-fields-module
===========================

CustomFields module for Thelia

10PHP

Since Mar 12Pushed 2d agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Custom Fields
=============

[](#custom-fields)

A Thelia module to add custom fields to products, content, categories, and folders with multi-language support.

Features
--------

[](#features)

- Create custom fields with different types (text, textarea, wysiwyg, content (ID), product (ID), folder (ID), category (ID))
- Assign custom fields to multiple sources (product, content, category, folder, general)
- Multi-language support for field values
- Tab integration in back-office edit pages
- Twig function for front-office display

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

[](#installation)

1. `composer require thelia/custom-fields-module`
2. Activate the module in the back-office

Usage
-----

[](#usage)

### Back-Office

[](#back-office)

1. **Create Custom Fields**: Go to Tools &gt; Custom Fields

    - Enter a title and unique code (e.g., `warranty_period`)
    - Select field type
    - Choose which sources can use this field (product, content, category, folder, general)
2. **Edit Field Values**: When editing a product/content/category/folder:

    - Navigate to the "Custom Fields" tab
    - Enter values for each language using the language selector
    - Save changes
3. **Edit Field Values General**: Go to Tools &gt; Custom Fields

    - Navigate to the "General Fields" tab
    - Enter values for each language using the language selector
    - Save changes

### Front-Office (Twig Templates)

[](#front-office-twig-templates)

Use the `custom_field_value` function to display custom field values:

```
{* Display custom field for current locale *}
{{ custom_field_value('warranty_period', 'product', product_id) }}

{* Display custom general field *}
{{ custom_field_value('warranty_period') }}

{* Display custom field for specific locale *}
{{ custom_field_value('warranty_period', 'product', product_id, 'en_US') }}
```

**Parameters:**

- `code`: The custom field code
- `source`: Source type (`product`, `content`, `category`, `folder`) - default : `general`
- `source_id`: The entity ID (no need to specify for `general` source)
- `locale` (optional): Specific locale (defaults to current session locale)

Example
-------

[](#example)

```
{* In a product template *}
{if custom_field_value('warranty_period', 'product', $PRODUCT_ID)}

        Warranty:
        {custom_field_value('warranty_period', 'product', $PRODUCT_ID)}

{/if}
```

###  Health Score

21

—

LowBetter than 21% of packages

Maintenance65

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

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

---

Top Contributors

[![leanormandon](https://avatars.githubusercontent.com/u/30038624?v=4)](https://github.com/leanormandon "leanormandon (11 commits)")

### Embed Badge

![Health badge](/badges/thelia-custom-fields-module/health.svg)

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

PHPackages © 2026

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