{"id":20499812,"url":"https://github.com/sherlockode/sylius-wishlist-bundle","last_synced_at":"2026-04-21T06:01:26.154Z","repository":{"id":57049320,"uuid":"123263532","full_name":"sherlockode/sylius-wishlist-bundle","owner":"sherlockode","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-07T07:48:25.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-16T06:58:14.279Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sherlockode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-28T09:41:20.000Z","updated_at":"2018-08-07T07:48:10.000Z","dependencies_parsed_at":"2022-08-23T19:10:19.770Z","dependency_job_id":null,"html_url":"https://github.com/sherlockode/sylius-wishlist-bundle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherlockode%2Fsylius-wishlist-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherlockode%2Fsylius-wishlist-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherlockode%2Fsylius-wishlist-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sherlockode%2Fsylius-wishlist-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sherlockode","download_url":"https://codeload.github.com/sherlockode/sylius-wishlist-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242090347,"owners_count":20070135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T18:18:34.561Z","updated_at":"2026-04-21T06:01:26.101Z","avatar_url":"https://github.com/sherlockode.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sylius Wishlist Bundle\n\nThis bundle adds wishlist functionality to Sylius e-commerce platform. It can be configured\nto use single or multiple wishlists per user, which can be public or private.\n\n---\n\n## Installation\n\n  1. require the bundle with Composer:\n\n  ```bash\n  $ composer require sherlockode/sylius-wishlist-bundle\n  ```\n\n  2. enable the bundle in `app/AppKernel.php`:\n\n  ```php\n  public function registerBundles()\n  {\n    $bundles = [\n      // ...\n      new \\Sherlockode\\Sylius\\WishlistBundle\\SherlockodeSyliusWishlistBundle(),\n      // ...\n    ];\n  }\n  ```\n\n  3. add configuration to the top of `app/config/config.yml`:\n\n  ```yaml\n  imports:\n      - { resource: \"@SherlockodeSyliusWishlistBundle/Resources/config/config.yml\" }\n  ```\n\n  Among other things, this provides configuration entries which can then be overriden\n  in your app's config.yml.\n\n  ```\n  sherlockode_sylius_wishlist:\n      multiple: true           # multiple wishlist mode\n      default_public: false    # used for automatically created wishlists\n  ```\n\n  4. register routes in `app/config/routing.yml`\n\n  ```yaml\n  sherlockode_wishlist:\n    resource: \"@SherlockodeSyliusWishlistBundle/Resources/config/routing.yml\"\n  \n  sherlockode_wishlist_front:\n    resource: \"@SherlockodeSyliusWishlistBundle/Resources/config/routingFront.yml\"\n    prefix: /wishlist\n  \n  sherlockode_wishlist_account:\n    resource: \"@SherlockodeSyliusWishlistBundle/Resources/config/routingAccount.yml\"\n    prefix: /account/wishlists\n  ```\n\n  As you can see, there are three groups of routes, the main resource (administration)\n  routes, frontend routes, and user account routes where the user can manage their\n  wishlist(s), create new ones, mark them public/private, etc...\n\n  5. The bundle should now be fully integrated, but it still requires\n  database tables to be created. For this, we recommend using migrations.\n  \n  ```bash\n  $ bin/console doctrine:migrations:diff\n  $ bin/console doctrine:migrations:migrate\n  ```\n  \n  Or if you don't use migrations, you can update the database schema directly.\n  \n  ```bash\n    $ bin/console doctrine:schema:update\n  ```\n\n  6. If you're integrating this bundle into an existing project, your existing\n  users will not have any wishlists associated. This is not an issue as wishlists\n  are automatically created when needed. All new users will automatically have\n  a wishlist created for them from the start.\n  \n  If you want to make sure all your users have wishlists, you can run a command\n  which will create initial wishlists for all existing users which do not already have one.\n\n  ```bash\n  $ bin/console sherlockode:sylius-wishlist-bundle:create-initial\n  ```\n\n## Integration on shop pages\n\nNow that you've installed and integrated the bundle, the users can view their wishlists,\ncreate new ones, etc, depending on bundle configuration, but they still have no way of\nadding products to wishlists. Since each project will have custom product pages,\nthis implementation is up to you. It can be done in two ways.\n\n  1. Simple\n\n  Since 'add to wishlist' functionality is almost the same as adding items to cart,\n  the simplest way to finalize integration is to add a new 'Add to wishlist' button\n  next to the 'Add to cart' button in the existing form.\n\n  Open the template containing your 'add to cart' form, most likely in:\n  `app/Resources/SyliusShopBundle/Resources/views/Product/Show/_addToCart.html.twig`\n\n  Find the 'add to cart' button, by default:\n  ```\n  \u003cbutton type=\"submit\" class=\"ui huge primary icon labeled button\"\u003e\u003ci class=\"cart icon\"\u003e\u003c/i\u003e {{ 'sylius.ui.add_to_cart'|trans }}\u003c/button\u003e\n  ```\n\n  And under it, add the following line.\n  ```\n  {% include '@SherlockodeSyliusWishlist/Frontend/Shop/_addToWishlist.html.twig' %}\n  ```\n  \n  This will include the 'Add to Wishlist' button, and all required functionality.\n  It will also feature a dropdown if the user has more than one wishlist,\n  to enable the user to select which wishlist they want to add the item to.\n\n  The dropdown will only be rendered if the user has more than one wishlist.\n\n  2. Custom AJAX implementation\n\n  An alternative is to implement your own, fully custom 'add to wishlist' functionality.\n  To accomplish this, submit data to the `sherlockode_wishlist_frontend_add_item` route.\n\n  ```\n  $.ajax({\n      url: '/wishlist/item/',\n      type: 'POST',\n      data: {\n          productVariantId: 123,\n          wishlistId: 456 // optional\n      },\n      success: // ...\n  });\n  ```\n\n  You can also submit the data in the same format as in the first example\n  (the 'add-to-cart' form), both examples use the same route, and both\n  accept variant data to be resolved (first example), or an already resolved\n  productVariantId.\n  \n### Wishlist badge\n\nYou might also want to feature a badge in your header which links to the wishlist\n  and shows the current number of items added, similar to the existing cart badge.\n  \nTo do this, just add this line to the bottom of the same file\n`app/Resources/SyliusShopBundle/Resources/views/Cart/_widget.html.twig`\n\n```\n{% include '@SherlockodeSyliusWishlist/Frontend/Shop/_badge.html.twig' %}\n```\n  \n## Translations and naming\n\nThe bundle has multilingual support, and language files can be\noverridden as with any other bundle, by creating translation files in the\n`app/Resources/SherlockodeSyliusWishlistBundle/translations` directory.\n\nTo get started, check the bundle's main language file in:\n[Resources/translations/messages.en.yml](Resources/translations/messages.en.yml)\n\n## License\n\nThis bundle is available under the [MIT license](LICENSE).\n\n## To-do\n\n- Tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherlockode%2Fsylius-wishlist-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsherlockode%2Fsylius-wishlist-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsherlockode%2Fsylius-wishlist-bundle/lists"}