This plugins improves the Product Options.


Monsieur Biz logo      Sylius logo
Monsieur Biz is a Sylius Extension Artisan partner

Advanced Option

Advanced Option Plugin license Tests Status Security Status

This plugins improves the Options in Sylius. It adds the possibility to select a renderer and to add images to the option's values.


composer require monsieurbiz/sylius-advanced-option-plugin

Change your config/bundles.php file to add this line for the plugin declaration:


return [
    MonsieurBiz\SyliusAdvancedOptionPlugin\MonsieurBizSyliusAdvancedOptionPlugin::class => ['all' => true],

Then create the config file in config/packages/monsieurbiz_sylius_advanced_option_plugin.yaml:

    - { resource: "@MonsieurBizSyliusAdvancedOptionPlugin/Resources/config/config.yaml" }

And create the route file in config/routes/monsieurbiz_sylius_advanced_option_plugin.yaml:

    resource: "@MonsieurBizSyliusAdvancedOptionPlugin/Resources/config/routing/admin.yaml"
    prefix: /%sylius_admin.path_name%

Copy the templates we override:

cp -Rv vendor/monsieurbiz/sylius-advanced-option-plugin/src/Resources/templates/* templates/

Your ProductOption entity needs to implement the RenderedOptionInterface interface and use the MonsieurBiz\SyliusAdvancedOptionPlugin\Entity\ProductOption\RenderedOptionTrait trait. As in our test application: ProductOption.

Your ProductOptionValue entity needs to implement the RenderedOptionValueInterface interface and use the MonsieurBiz\SyliusAdvancedOptionPlugin\Entity\ProductOption\RenderedOptionValueTrait trait. As in our test application: ProductOption.


Migrations are taken care of by Doctrine 3.

You should just run them:

bin/console doctrine:migrations:migrate

Template override

If you have already replaced the templates/bundles/SyliusShopBundle/Product/Show/_options.html.twig template in your theme, modify the content to use the twig functions:

  • monsieurbiz_advancedoption_has_renderer
  • monsieurbiz_advancedoption_form_row

Read the default override to get inspiration from its content: _options.html.twig.


  • EasyMonneret


You can open an issue or a Pull Request if you want! 😘
Thank you!