setono/sylius-wishlist-plugin

Setono example plugin for Sylius.

Fund package maintenance!
Setono

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 2

Type:sylius-plugin

dev-master / 1.0.x-dev 2024-11-19 10:30 UTC

This package is auto-updated.

Last update: 2024-11-19 10:30:53 UTC


README

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