PHPackages                             brille24/sylius-customer-options-plugin - 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. brille24/sylius-customer-options-plugin

ActiveSylius-plugin

brille24/sylius-customer-options-plugin
=======================================

Adds product customizing to Sylius

v4.0.5(8mo ago)4834.9k39[1 issues](https://github.com/Brille24/SyliusCustomOptionsPlugin/issues)[4 PRs](https://github.com/Brille24/SyliusCustomOptionsPlugin/pulls)1MITPHPPHP &gt;=8.0

Since Aug 20Pushed 6mo ago6 watchersCompare

[ Source](https://github.com/Brille24/SyliusCustomOptionsPlugin)[ Packagist](https://packagist.org/packages/brille24/sylius-customer-options-plugin)[ RSS](/packages/brille24-sylius-customer-options-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (31)Versions (73)Used By (1)

Customer Options
================

[](#customer-options)

[![](https://camo.githubusercontent.com/5b98e02f3693c16fd3f40037251d70ca5e1ecd2a11608dd21c9c7e3933b8942e/68747470733a2f2f73796c6975732e636f6d2f6173736574732f62616467652d617070726f7665642d62792d73796c6975732e706e67)](https://camo.githubusercontent.com/5b98e02f3693c16fd3f40037251d70ca5e1ecd2a11608dd21c9c7e3933b8942e/68747470733a2f2f73796c6975732e636f6d2f6173736574732f62616467652d617070726f7665642d62792d73796c6975732e706e67)

With this plugin the customer can add additional info to the product like so: [![Price import forms](docs/images/customeroption_frontend.png "The customer can upload a file")](docs/images/customeroption_frontend.png)[![Price import forms](docs/images/customeroption_frontend_cart.png "And it will be displayed in the cart")](docs/images/customeroption_frontend_cart.png)

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

[](#installation)

- Run `composer require brille24/sylius-customer-options-plugin`.
- Register the Plugin in your `config/bundles.php`:

```
return [
    //...
    Brille24\SyliusCustomerOptionsPlugin\Brille24SyliusCustomerOptionsPlugin::class => ['all' => true],
];
```

- Add the `config.yml` to your local `config/packages/_sylius.yaml`:

```
imports:
    ...
    - { resource: "@Brille24SyliusCustomerOptionsPlugin/Resources/config/app/config.yml" }
```

- Add the `routing.yml` to your local `config/routes.yaml`:

```
brille24_customer_options:
    resource: "@Brille24SyliusCustomerOptionsPlugin/Resources/config/app/routing.yml"

sylius_shop_ajax_cart_add_item:
  path: ajax/cart/add
  methods: [POST]
  defaults:
    _controller: sylius.controller.order_item::addAction
    _format: json
    _sylius:
      factory:
        method: createForProductWithCustomerOption
        arguments: [expr:notFoundOnNull(service('sylius.repository.product').find($productId))]
      form:
        type: Sylius\Bundle\CoreBundle\Form\Type\Order\AddToCartType
        options:
          product: expr:notFoundOnNull(service('sylius.repository.product').find($productId))
      redirect:
        route: sylius_shop_cart_summary
        parameters: {}
      flash: sylius.cart.add_item

sylius_shop_partial_cart_add_item:
  path: cart/add-item
  methods: [GET]
  defaults:
    _controller: sylius.controller.order_item::addAction
    _sylius:
      template: $template
      factory:
        method: createForProductWithCustomerOption
        arguments: [expr:notFoundOnNull(service('sylius.repository.product').find($productId))]
      form:
        type: Sylius\Bundle\CoreBundle\Form\Type\Order\AddToCartType
        options:
          product: expr:notFoundOnNull(service('sylius.repository.product').find($productId))
      redirect:
        route: sylius_shop_cart_summary
        parameters: {}
```

- Copy the template overrides from the plugin directory

```
From: [shop_dir]/vendor/brille24/sylius-customer-options-plugin/test/Application/templates
To: [shop_dir]/templates

```

In order to use the customer options, you need to override the product and order item.

```
use Brille24\SyliusCustomerOptionsPlugin\Entity\ProductInterface;
use Brille24\SyliusCustomerOptionsPlugin\Traits\ProductCustomerOptionCapableTrait;
use Sylius\Component\Core\Model\Product as BaseProduct;

class Product extends BaseProduct implements ProductInterface {
    use ProductCustomerOptionCapableTrait {
        __construct as protected customerOptionCapableConstructor;
    }

     public function __construct()
    {
        parent::__construct();

        $this->customerOptionCapableConstructor();
    }
    // ...
}
```

```
use Brille24\SyliusCustomerOptionsPlugin\Entity\OrderItemInterface;
use Brille24\SyliusCustomerOptionsPlugin\Traits\OrderItemCustomerOptionCapableTrait;
use Sylius\Component\Core\Model\OrderItem as BaseOrderItem;

class OrderItem extends BaseOrderItem implements OrderItemInterface
{
    use OrderItemCustomerOptionCapableTrait {
        __construct as protected customerOptionCapableConstructor;
    }

    public function __construct()
    {
        parent::__construct();

        $this->customerOptionCapableConstructor();
    }
    // ...
}
```

- If you also want default data you need to copy over the `brille24_sylius_customer_options_plugin_fixtures.yaml` file from the package directory and run

```
bin/console sylius:fixtures:load
```

- Finally, generate migrations, update the database and update the translations:

```
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate
bin/console translation:update
```

Things to consider
------------------

[](#things-to-consider)

- Saving files as customer defined values as the values are currently stored as a string in the database

Developing
----------

[](#developing)

When developing it is recommended to use git hooks for this just copy the `docs/pre-commit` to `.git/hooks/pre-commit` and make it executable. Then you will check your codestyle before committing.

Usage
-----

[](#usage)

Documentation on how to use the plugin can be found [here](docs/usage.md).

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance62

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 50.7% 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.

###  Release Activity

Cadence

Every ~42 days

Recently: every ~118 days

Total

62

Last Release

257d ago

Major Versions

0.3.5 → v1.4.52019-05-29

v1.6.1 → 2.0.02020-02-28

1.9.1 → 2.9.12021-05-01

v2.17.0 → v3.0.02023-03-01

3.1.0 → v4.0.02024-02-08

PHP version history (5 changes)v0.1PHP ^7.2

2.5PHP ^7.3

2.13.0PHP ^7.4 || ^8.0

v3.0.0PHP &gt;=7.4

v3.0.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/64c07f8e28dafc37f7cdd920a3a87e0e45fa8c04486c828b3528cc5548b7567f?d=identicon)[brille24](/maintainers/brille24)

---

Top Contributors

[![mamazu](https://avatars.githubusercontent.com/u/14860264?v=4)](https://github.com/mamazu "mamazu (320 commits)")[![pamil](https://avatars.githubusercontent.com/u/1897953?v=4)](https://github.com/pamil "pamil (189 commits)")[![JakobTolkemit](https://avatars.githubusercontent.com/u/30623938?v=4)](https://github.com/JakobTolkemit "JakobTolkemit (32 commits)")[![lchrusciel](https://avatars.githubusercontent.com/u/6213903?v=4)](https://github.com/lchrusciel "lchrusciel (19 commits)")[![bitbager](https://avatars.githubusercontent.com/u/28542010?v=4)](https://github.com/bitbager "bitbager (12 commits)")[![pjedrzejewski](https://avatars.githubusercontent.com/u/614970?v=4)](https://github.com/pjedrzejewski "pjedrzejewski (9 commits)")[![Zales0123](https://avatars.githubusercontent.com/u/6212718?v=4)](https://github.com/Zales0123 "Zales0123 (7 commits)")[![stefandoorn](https://avatars.githubusercontent.com/u/4903082?v=4)](https://github.com/stefandoorn "stefandoorn (7 commits)")[![bartoszpietrzak1994](https://avatars.githubusercontent.com/u/22262296?v=4)](https://github.com/bartoszpietrzak1994 "bartoszpietrzak1994 (5 commits)")[![sylfrid](https://avatars.githubusercontent.com/u/4681484?v=4)](https://github.com/sylfrid "sylfrid (3 commits)")[![shochdoerfer](https://avatars.githubusercontent.com/u/596449?v=4)](https://github.com/shochdoerfer "shochdoerfer (3 commits)")[![marek-pietrzak-tg](https://avatars.githubusercontent.com/u/2435655?v=4)](https://github.com/marek-pietrzak-tg "marek-pietrzak-tg (2 commits)")[![antiseptikk](https://avatars.githubusercontent.com/u/1520152?v=4)](https://github.com/antiseptikk "antiseptikk (2 commits)")[![seizan8](https://avatars.githubusercontent.com/u/32196755?v=4)](https://github.com/seizan8 "seizan8 (2 commits)")[![Loocos](https://avatars.githubusercontent.com/u/26056280?v=4)](https://github.com/Loocos "Loocos (2 commits)")[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (2 commits)")[![Prometee](https://avatars.githubusercontent.com/u/861820?v=4)](https://github.com/Prometee "Prometee (2 commits)")[![mbutl](https://avatars.githubusercontent.com/u/129760613?v=4)](https://github.com/mbutl "mbutl (1 commits)")[![ancarda](https://avatars.githubusercontent.com/u/3399778?v=4)](https://github.com/ancarda "ancarda (1 commits)")[![DieterHolvoet](https://avatars.githubusercontent.com/u/3606531?v=4)](https://github.com/DieterHolvoet "DieterHolvoet (1 commits)")

---

Tags

cartcustomizationpricesylius

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/brille24-sylius-customer-options-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/brille24-sylius-customer-options-plugin/health.svg)](https://phpackages.com/packages/brille24-sylius-customer-options-plugin)
```

###  Alternatives

[bitbag/elasticsearch-plugin

BitBag Elasticsearch plugin for Sylius.

133482.7k](/packages/bitbag-elasticsearch-plugin)[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

691.7M14](/packages/sylius-refund-plugin)[stefandoorn/sitemap-plugin

Sitemap Plugin for Sylius

851.0M](/packages/stefandoorn-sitemap-plugin)[sylius/paypal-plugin

PayPal plugin for Sylius.

451.4M4](/packages/sylius-paypal-plugin)[monsieurbiz/sylius-rich-editor-plugin

A Rich Editor plugin for Sylius.

75380.8k6](/packages/monsieurbiz-sylius-rich-editor-plugin)[webgriffe/sylius-akeneo-plugin

Plugin allowing to import products data from Akeneo PIM to your Sylius store.

2477.8k](/packages/webgriffe-sylius-akeneo-plugin)

PHPackages © 2026

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