Skip to content

Commit

Permalink
OP-291: Bring back installations steps using recipes and make them op…
Browse files Browse the repository at this point in the history
…tional
  • Loading branch information
hmfilar committed Aug 2, 2024
1 parent 516c2bb commit 2f48a04
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions doc/01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,36 @@
composer require bitbag/wishlist-plugin
```

2. Override `OrderItemController`
2. (optional) Add plugin dependencies to your `config/bundles.php` file:

```php
// config/bundles.php

return [
...

BitBag\SyliusWishlistPlugin\BitBagSyliusWishlistPlugin::class => ['all' => true],
];
```

3. (optional) Import required config in your `config/packages/_sylius.yaml` file:

```yaml
# config/packages/_sylius.yaml
imports:
...
- { resource: "@BitBagSyliusWishlistPlugin/Resources/config/config.yml" }
```
4. (optional) Import routing in your `config/routes.yaml` file:

```yaml
# config/routes.yaml
bitbag_sylius_wishlist_plugin:
resource: "@BitBagSyliusWishlistPlugin/Resources/config/routing.yml"
```

5. Override `OrderItemController`

```yaml
sylius_order:
Expand All @@ -23,7 +52,7 @@ sylius_order:
```

3. Add plugin templates:
6. Add plugin templates:

- Inject blocks:

Expand All @@ -44,24 +73,24 @@ sylius_ui:
- Override templates:

```bash
cp vendor/bitbag/wishlist-plugin/src/Resources/view/Product/Show/_addToCart.html.twig templates/bundles/SyliusShopBundle/Product/Show
cp vendor/bitbag/wishlist-plugin/src/Resources/views/Product/Show/_addToCart.html.twig templates/bundles/SyliusShopBundle/Product/Show
```

4. Clear application cache by using command:
7. Clear application cache by using command:

```bash
bin/console cache:clear
```

5. Update your database
8. Update your database

```bash
bin/console doctrine:migrations:migrate
```

**Note:** If you are running it on production, add the `-e prod` flag to this command.

6. Add plugin assets to your project
9. Add plugin assets to your project

We recommend you to use Webpack (Encore), for which we have prepared four different instructions on how to add this plugin's assets to your project:

Expand Down

0 comments on commit 2f48a04

Please sign in to comment.