PHPackages                             thelia/option-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/option-module

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

thelia/option-module
====================

Option module for Thelia

2.0.2(1y ago)01755[1 PRs](https://github.com/thelia-modules/Option/pulls)LGPL-3.0-or-laterPHP

Since Mar 26Pushed 1y ago6 watchersCompare

[ Source](https://github.com/thelia-modules/Option)[ Packagist](https://packagist.org/packages/thelia/option-module)[ RSS](/packages/thelia-option-module/feed)WikiDiscussions main Synced 1mo ago

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

Option
======

[](#option)

This module allows you to manage the addition of paid options to your products.

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

[](#installation)

### Composer

[](#composer)

```
composer require thelia/option-module:~1.0

```

Usage
-----

[](#usage)

Options closely resemble a standard Thelia product, with a price to which you can add tax rules, promotional status, an image, a description, etc.

### BackOffice Configuration

[](#backoffice-configuration)

From the module menu, you can: :

- Create, modify, or delete an option
- Assign an option to a product, category, or template

Assigning an option to a category or template will affect all linked products, making it easy to manage options and their assignment to relevant products.

### Customization of Options

[](#customization-of-options)

An option may require user input (e.g., customizing a knife with text). To achieve this, you can link an option to a Symfony form. This form inherits from the class [BaseOptionFrontForm.php](Form%2FBase%2FBaseOptionFrontForm.php). The form describes all the fields necessary for adding the product to the shopping cart (in this case, the knife). The form's name should correspond to the option reference (see: `getName()`).

```
class OptionKnifeTextForm extends BaseOptionFrontForm
{
    protected function buildForm(): void
    {
        parent::buildForm();
        [...]
    }

    public static function getName():string
    {
        return 'OPTION_REF';
    }
}
```

Front-End Application

Two routes are available to manipulate options and products in the shopping cart.

See OpenApi doc :

```
GET /open_api/doc

```

List options for a product selling unit (pse):

```
GET /open_api/option/get/{pseId}

```

Add one or more options to a cart item :

```
POST /open_api/option/add/{cartItemId}

```

Hook
----

[](#hook)

In addition to the hook to attach the menu dedicated to option management in the main backOffice menu, a hook is used to link an order product with the information provided by the option. To customize the display of this information on an invoice, you will need to override the order\_product\_additional\_data.html template [order\_product\_additional\_data.html](templates%2FbackOffice%2Fdefault%2Forder-product%2Forder_product_additional_data.html).

Loop
----

[](#loop)

Use [generic](https://doc.thelia.net/docs/loops/Generic) loop !

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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 ~35 days

Recently: every ~54 days

Total

8

Last Release

535d ago

Major Versions

1.0.4 → 2.0.02024-05-30

### Community

Maintainers

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

---

Top Contributors

[![zawaze](https://avatars.githubusercontent.com/u/37273643?v=4)](https://github.com/zawaze "zawaze (8 commits)")[![leanormandon](https://avatars.githubusercontent.com/u/30038624?v=4)](https://github.com/leanormandon "leanormandon (4 commits)")[![lopes-vincent](https://avatars.githubusercontent.com/u/6057206?v=4)](https://github.com/lopes-vincent "lopes-vincent (4 commits)")[![anoziere](https://avatars.githubusercontent.com/u/118798868?v=4)](https://github.com/anoziere "anoziere (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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