Download the PHP package sherlockode/sylius-wishlist-bundle without Composer

On this page you can find all versions of the php package sherlockode/sylius-wishlist-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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

  1. require the bundle with Composer:

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

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

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

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

    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.

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

  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.

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:

    And under it, add the following line.

    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.

    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

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

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

License

This bundle is available under the MIT license.

To-do


All versions of sylius-wishlist-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
sylius/core Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sherlockode/sylius-wishlist-bundle contains the following files

Loading the files please wait ....