Installation

The Sylius Wishlist Plugin introduces wishlist capabilities to your Sylius-based eCommerce platform. It allows customers to save products for later, improving user engagement and purchase intent.

Supported Version: This guide assumes you're using Sylius 2.x with Symfony Flex. If you're using a legacy setup without Symfony Flex, refer to the legacy installation instructions instead.

1. Prepare Your Environment

Before installing the plugin, ensure that your project:

  • Uses Symfony Flex

  • Runs a supported Sylius 2.x version

  • Has yarn and Symfony Encore correctly configured

2. Allow Symfony Contrib Recipes

To allow Symfony to install community recipes (such as for the Wishlist plugin):

composer config extra.symfony.allow-contrib true

If prompted during plugin installation, accept the community recipe when asked.


3. Install the Plugin via Composer

composer require sylius/wishlist-plugin

This will install the plugin and apply the Flex recipe, registering the necessary services and configuration automatically.


4. Install Required JavaScript Packages (Optional)

If you want to customize or extend the Wishlist plugin's frontend components, you may need to install JavaScript packages used in your theme.

Example (if you are extending features with modals, dropdowns, etc.):

yarn install
yarn encore dev

For production:

yarn encore production

The Wishlist Plugin does not enforce specific frontend dependencies like trix or swiper, but requires Yarn/Webpack Encore if you plan to override or extend its templates.


5. Run Doctrine Migrations

The plugin comes with database changes. Run:

bin/console doctrine:migrations:migrate

For production:

bin/console doctrine:migrations:migrate -e prod

6. Clear the Cache

Finally, clear the Symfony cache to ensure changes are applied:

bin/console cache:clear

Asynchronous Messenger case

In case you use asynchronous Messenger transport by default, there is a need to configure all Wishlist commands to sync transport. You can do this by configuring the WishlistSyncCommandInterface interface to sync transport (as presented in the code listing below).

# config/packages/messenger.yaml

framework:
    messenger:
        transports:
            sync: 'sync://'
    routing:
        'Sylius\WishlistPlugin\Command\Wishlist\WishlistSyncCommandInterface': sync

All commands from the plugin implement the WishlistSyncCommandInterface interface, so there is no need for other configuration.

✅ Installation Complete!

You should now see wishlist options in your Sylius storefront. Customers can:

  • Add products to their wishlist

  • Manage multiple wishlists (if enabled)

  • Share and move items to the cart

For further customization, refer to the official plugin repository or ask for help in the Sylius Community Slack.

Last updated

Was this helpful?