Download the PHP package monsieurbiz/sylius-advanced-option-plugin without Composer
On this page you can find all versions of the php package monsieurbiz/sylius-advanced-option-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download monsieurbiz/sylius-advanced-option-plugin
More information about monsieurbiz/sylius-advanced-option-plugin
Files in monsieurbiz/sylius-advanced-option-plugin
Package sylius-advanced-option-plugin
Short Description This plugins improves the Product Options.
License MIT
Informations about the package sylius-advanced-option-plugin
Advanced Option
This plugins improves the Options in Sylius. It adds the possibility to select a renderer and to add images to the option's values.
Compatibility
Sylius Version | PHP Version |
---|---|
1.12 | 8.1 - 8.2 - 8.3 |
1.13 | 8.1 - 8.2 - 8.3 |
1.14 | 8.1 - 8.2 - 8.3 |
Installation
If you want to use our recipes, you can configure your composer.json by running:
Change your config/bundles.php
file to add this line for the plugin declaration:
Then create the config file in config/packages/monsieurbiz_sylius_advanced_option_plugin.yaml
:
And create the route file in config/routes/monsieurbiz_sylius_advanced_option_plugin.yaml
:
Copy the templates we override:
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
Migrations are taken care of by Doctrine 3.
You should just run them:
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.
Sponsors
- EasyMonneret
Contributing
You can open an issue or a Pull Request if you want! 😘
Thank you!