PHPackages                             solutiondrive/sylius-product-bundles-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. solutiondrive/sylius-product-bundles-plugin

AbandonedArchivedSylius-plugin

solutiondrive/sylius-product-bundles-plugin
===========================================

Plugin for Sylius to configure bundles for products that can be sold together

v0.5.0(8y ago)201.9k4[5 issues](https://github.com/solutionDrive/SyliusProductBundlesPlugin/issues)MITPHPPHP ^7.1

Since Mar 15Pushed 7y ago3 watchersCompare

[ Source](https://github.com/solutionDrive/SyliusProductBundlesPlugin)[ Packagist](https://packagist.org/packages/solutiondrive/sylius-product-bundles-plugin)[ RSS](/packages/solutiondrive-sylius-product-bundles-plugin/feed)WikiDiscussions master Synced yesterday

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

 [ ![](https://camo.githubusercontent.com/1567208cc7c8ec53cf6e2af4f54449a9bb3ab0dee7916998de4e3ce9b7f79015/68747470733a2f2f64656d6f2e73796c6975732e636f6d2f6173736574732f73686f702f696d672f6c6f676f2e706e67) ](http://sylius.org)

Sylius Product Bundles Plugin
=============================

[](#sylius-product-bundles-plugin)

[![License](https://camo.githubusercontent.com/15d3976656b38a8ba4bf49e20adcb15576774355bd38d2c51177afa4aca3d1e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736f6c7574696f6e64726976652f73796c6975732d70726f647563742d62756e646c65732d706c7567696e2e737667)](https://packagist.org/packages/solutiondrive/sylius-product-bundles-plugin)[![Packagist](https://camo.githubusercontent.com/68b207b13bc6db114256331e6a086134b822e7e1b67940e4b92cdededc508376/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6c7574696f6e64726976652f73796c6975732d70726f647563742d62756e646c65732d706c7567696e2e737667)](https://packagist.org/packages/solutiondrive/sylius-product-bundles-plugin)[![Build Status](https://camo.githubusercontent.com/55248db5140438605636d086b4a63fb3488755dcd3d1e5a3188d432755a9bedf/68747470733a2f2f7472617669732d63692e6f72672f736f6c7574696f6e44726976652f53796c69757350726f6475637442756e646c6573506c7567696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/solutionDrive/SyliusProductBundlesPlugin)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b15e2e29f55dba45354721fd702ccb3526379a397b52e2806657f150841dd2f3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736f6c7574696f6e44726976652f53796c69757350726f6475637442756e646c6573506c7567696e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/solutionDrive/SyliusProductBundlesPlugin/?branch=master)

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

[](#installation)

1. Run `composer create-project sylius/plugin-skeleton ProjectName`.
2. From the plugin skeleton root directory, run the following commands:

    ```
    $ (cd tests/Application && yarn install)
    $ (cd tests/Application && yarn run gulp)
    $ (cd tests/Application && bin/console assets:install web -e test)

    $ (cd tests/Application && bin/console doctrine:database:create -e test)
    $ (cd tests/Application && bin/console doctrine:schema:create -e test)
    ```

Definition
----------

[](#definition)

### ProductBundle

[](#productbundle)

*ProductBundles* are a independent resource and have a OneToOne-relationship with a *Product* that represents the bundle throughout the sylius-framework, e.g. for calculating prices and taxes in the checkout. The content of a *ProductBundle* is organized in *ProductBundleSlots*. One ProductBundle can have 1 to n ProductBundleSlots.

### ProductBundleSlots

[](#productbundleslots)

*ProductBundleSlots* represent a group of products that can be switched through by the customer. E.g. in a Bundle for football-Teams there could be a Slot 'Shirts', in which different kinds of shirts can be referenced. Only one item of each *ProductBundleSlot* is part of the finally bought bundle.

Usage
-----

[](#usage)

### ProductBundleCreator

[](#productbundlecreator)

This is a service to create ProductBundles programmatically. It will only create Objects necessary for the ProductBundle. It won't create products for you. But if you have the products that should be part of the bundle you want to create, they can be associated with the created bundle and the slots inside the bundle.

#### get the service

[](#get-the-service)

```
$bundleCreator = $container->get('solutiondrive.product_bundles.product_bundle_creator');
```

#### create your bundle

[](#create-your-bundle)

```
$slotOptionsFactory = new solutionDrive\SyliusProductBundlesPlugin\Factory\ProductBundleSlotOptionsFactory();

$hatSlotOptions = $slotOptionsFactory->createNewWithValues(1, 'TopHats');

$shirtSlotOptions = $slotOptionsFactory->createNewWithValues(2, 'Shirts', ['someAdditionalOption' => 'AndItsValue']);

$bundleCreator->createProductBundle('YourAwesomeBundle', $prductRepresentationOfTheBundle);
$bundleCreator->addSlot('YourAwsomeHats', $hatSlotOptions, $hatsToAssignToSlot);
$bundleCreator->addSlot('YourAwsomeShirts', $shirtSlotOptions, $shirtsToAssignToSlot);

$productBundle = $bundleCreator->getProductBundle();
```

### Fixtures

[](#fixtures)

Sometimes you'll need to set up your environment quickly and add some default bundles. You can take a look at `tests/Application/app/config/fixtures.yml` file to see how you can configure fixtures.

### Running plugin tests

[](#running-plugin-tests)

- PHPUnit

    ```
    $ bin/phpunit
    ```
- PHPSpec

    ```
    $ bin/phpspec run
    ```
- Behat (non-JS scenarios)

    ```
    $ bin/behat --tags="~@javascript"
    ```
- Behat (JS scenarios)

    1. Download [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/)
    2. Run Selenium server with previously downloaded Chromedriver:

        ```
        $ bin/selenium-server-standalone -Dwebdriver.chrome.driver=chromedriver
        ```
    3. Run test application's webserver on `localhost:8080`:

        ```
        $ (cd tests/Application && bin/console server:run 127.0.0.1:8080 -d web -e test)
        ```
    4. Run Behat:

        ```
        $ bin/behat --tags="@javascript"
        ```

### Opening Sylius with your plugin

[](#opening-sylius-with-your-plugin)

- Using `test` environment:

    ```
    $ (cd tests/Application && bin/console sylius:fixtures:load -e test)
    $ (cd tests/Application && bin/console server:run -d web -e test)
    ```
- Using `dev` environment:

    ```
    $ (cd tests/Application && bin/console sylius:fixtures:load -e dev)
    $ (cd tests/Application && bin/console server:run -d web -e dev)
    ```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

2955d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/667b5107f4c2ea180baa00166c2ee3f2a1b412ce22768d6e81bb09323d1c7fe0?d=identicon)[netlogix](/maintainers/netlogix)

![](https://www.gravatar.com/avatar/9c04fbc5922166132f9ded7b5d8efdfcc57f20deb1837bf38ed081327343993a?d=identicon)[sd\_alt](/maintainers/sd_alt)

![](https://avatars.githubusercontent.com/u/16880583?v=4)[Tobias Lückel](/maintainers/sd-lueckel)[@sd-lueckel](https://github.com/sd-lueckel)

![](https://www.gravatar.com/avatar/a4b576421ecba084a2b7bac74e3ce54476b44e80da0aa89bfc3e19a84115735a?d=identicon)[twojtylak](/maintainers/twojtylak)

![](https://www.gravatar.com/avatar/24edefe3f5deaace871051bc6206adf207954d2bf5f45b8ca56b096287b85597?d=identicon)[nlx-vladi](/maintainers/nlx-vladi)

![](https://www.gravatar.com/avatar/774d994f0c68da56719c96d83499828a32d5dd2e4931a7986e335750b13daf2f?d=identicon)[michz](/maintainers/michz)

---

Top Contributors

[![michz](https://avatars.githubusercontent.com/u/7523691?v=4)](https://github.com/michz "michz (9 commits)")[![anthid](https://avatars.githubusercontent.com/u/1378508?v=4)](https://github.com/anthid "anthid (6 commits)")

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/solutiondrive-sylius-product-bundles-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/solutiondrive-sylius-product-bundles-plugin/health.svg)](https://phpackages.com/packages/solutiondrive-sylius-product-bundles-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)
