PHPackages                             sherlockode/sylius-wishlist-bundle - 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. sherlockode/sylius-wishlist-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

sherlockode/sylius-wishlist-bundle
==================================

Wishlist bundle for Sylius e-commerce platform.

v0.2(7y ago)0290MITPHPPHP ^7.1

Since Mar 23Pushed 7y ago2 watchersCompare

[ Source](https://github.com/sherlockode/sylius-wishlist-bundle)[ Packagist](https://packagist.org/packages/sherlockode/sylius-wishlist-bundle)[ RSS](/packages/sherlockode-sylius-wishlist-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Sylius Wishlist Bundle
======================

[](#sylius-wishlist-bundle)

This bundle adds wishlist functionality to Sylius e-commerce platform. It can be configured to use single or multiple wishlists per user, which can be public or private.

---

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

[](#installation)

1. require the bundle with Composer:

```
$ composer require sherlockode/sylius-wishlist-bundle
```

2. enable the bundle in `app/AppKernel.php`:

```
public function registerBundles()
{
  $bundles = [
    // ...
    new \Sherlockode\Sylius\WishlistBundle\SherlockodeSyliusWishlistBundle(),
    // ...
  ];
}
```

3. add configuration to the top of `app/config/config.yml`:

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

Among other things, this provides configuration entries which can then be overriden in your app's config.yml.

```
sherlockode_sylius_wishlist:
    multiple: true           # multiple wishlist mode
    default_public: false    # used for automatically created wishlists

```

4. register routes in `app/config/routing.yml`

```
sherlockode_wishlist:
  resource: "@SherlockodeSyliusWishlistBundle/Resources/config/routing.yml"

sherlockode_wishlist_front:
  resource: "@SherlockodeSyliusWishlistBundle/Resources/config/routingFront.yml"
  prefix: /wishlist

sherlockode_wishlist_account:
  resource: "@SherlockodeSyliusWishlistBundle/Resources/config/routingAccount.yml"
  prefix: /account/wishlists
```

As you can see, there are three groups of routes, the main resource (administration) routes, frontend routes, and user account routes where the user can manage their wishlist(s), create new ones, mark them public/private, etc...

5. The bundle should now be fully integrated, but it still requires database tables to be created. For this, we recommend using migrations.

```
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate
```

Or if you don't use migrations, you can update the database schema directly.

```
  $ bin/console doctrine:schema:update
```

6. If you're integrating this bundle into an existing project, your existing users will not have any wishlists associated. This is not an issue as wishlists are automatically created when needed. All new users will automatically have a wishlist created for them from the start.

If you want to make sure all your users have wishlists, you can run a command which will create initial wishlists for all existing users which do not already have one.

```
$ bin/console sherlockode:sylius-wishlist-bundle:create-initial
```

Integration on shop pages
-------------------------

[](#integration-on-shop-pages)

Now that you've installed and integrated the bundle, the users can view their wishlists, create new ones, etc, depending on bundle configuration, but they still have no way of adding products to wishlists. Since each project will have custom product pages, this implementation is up to you. It can be done in two ways.

1. Simple

Since 'add to wishlist' functionality is almost the same as adding items to cart, the simplest way to finalize integration is to add a new 'Add to wishlist' button next to the 'Add to cart' button in the existing form.

Open the template containing your 'add to cart' form, most likely in: `app/Resources/SyliusShopBundle/Resources/views/Product/Show/_addToCart.html.twig`

Find the 'add to cart' button, by default:

```
 {{ 'sylius.ui.add_to_cart'|trans }}

```

And under it, add the following line.

```
{% include '@SherlockodeSyliusWishlist/Frontend/Shop/_addToWishlist.html.twig' %}

```

This will include the 'Add to Wishlist' button, and all required functionality. It will also feature a dropdown if the user has more than one wishlist, to enable the user to select which wishlist they want to add the item to.

The dropdown will only be rendered if the user has more than one wishlist.

2. Custom AJAX implementation

An alternative is to implement your own, fully custom 'add to wishlist' functionality. To accomplish this, submit data to the `sherlockode_wishlist_frontend_add_item` route.

```
$.ajax({
    url: '/wishlist/item/',
    type: 'POST',
    data: {
        productVariantId: 123,
        wishlistId: 456 // optional
    },
    success: // ...
});

```

You can also submit the data in the same format as in the first example (the 'add-to-cart' form), both examples use the same route, and both accept variant data to be resolved (first example), or an already resolved productVariantId.

### Wishlist badge

[](#wishlist-badge)

You might also want to feature a badge in your header which links to the wishlist and shows the current number of items added, similar to the existing cart badge.

To do this, just add this line to the bottom of the same file `app/Resources/SyliusShopBundle/Resources/views/Cart/_widget.html.twig`

```
{% include '@SherlockodeSyliusWishlist/Frontend/Shop/_badge.html.twig' %}

```

Translations and naming
-----------------------

[](#translations-and-naming)

The bundle has multilingual support, and language files can be overridden as with any other bundle, by creating translation files in the `app/Resources/SherlockodeSyliusWishlistBundle/translations` directory.

To get started, check the bundle's main language file in: [Resources/translations/messages.en.yml](Resources/translations/messages.en.yml)

License
-------

[](#license)

This bundle is available under the [MIT license](LICENSE).

To-do
-----

[](#to-do)

- Tests

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

2833d ago

### Community

Maintainers

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

---

Tags

symfonysyliuswishlist

### Embed Badge

![Health badge](/badges/sherlockode-sylius-wishlist-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/sherlockode-sylius-wishlist-bundle/health.svg)](https://phpackages.com/packages/sherlockode-sylius-wishlist-bundle)
```

###  Alternatives

[sylius/fixtures-bundle

Configurable fixtures for Symfony applications.

517.7M12](/packages/sylius-fixtures-bundle)[sylius/refund-plugin

Plugin provides basic refunds functionality for Sylius application.

691.7M14](/packages/sylius-refund-plugin)[maba/webpack-bundle

Bundle to Integrate Webpack to Symfony

123268.2k4](/packages/maba-webpack-bundle)

PHPackages © 2026

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