Skip to content

Add wishlist feature to your Sylius store

License

Notifications You must be signed in to change notification settings

Setono/sylius-wishlist-plugin

Repository files navigation

Wishlist Plugin for Sylius

Latest Version Software License Build Status Code Coverage Mutation testing

This plugin adds a wishlist feature to Sylius. It comes with these features:

  • Add products to a wishlist (whether the visitor is logged in or not)
  • Allow multiple wishlists per user (not implemented yet)
  • Share wishlists with others
  • Add products to cart from wishlist

Installation

composer require setono/sylius-wishlist-plugin

Add plugin class to your bundles.php

Make sure you add it before SyliusGridBundle, otherwise you'll get You have requested a non-existent parameter "setono_sylius_wishlist.model.wishlist.class". exception.

<?php
$bundles = [
    // ...
    Setono\SyliusWishlistPlugin\SetonoSyliusWishlistPlugin::class => ['all' => true],
    Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
    // ...
];

Import routing

# config/routes/setono_sylius_wishlist.yaml
setono_sylius_wishlist:
    resource: "@SetonoSyliusWishlistPlugin/Resources/config/routes.yaml"

or if your app doesn't use locales:

# config/routes/setono_sylius_wishlist.yaml
setono_sylius_wishlist:
    resource: "@SetonoSyliusWishlistPlugin/Resources/config/routes_no_locale.yaml"

Update your database

php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate

Update your templates

TODO