Skip to content

Commit bb0c7c0

Browse files
committed
HM-1: docs update
1 parent d8c2246 commit bb0c7c0

File tree

6 files changed

+22
-219
lines changed

6 files changed

+22
-219
lines changed

doc/01-installation.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,53 +30,57 @@ return [
3030
# config/packages/_sylius.yaml
3131
imports:
3232
...
33-
- { resource: "@SyliusWishlistPlugin/Resources/config/config.yml" }
33+
- { resource: "@SyliusWishlistPlugin/config/config.yaml" }
3434
```
3535
3636
4. (optional) Import routing in your `config/routes.yaml` file:
3737

3838
```yaml
3939
# config/routes.yaml
4040
sylius_wishlist_plugin:
41-
resource: "@SyliusWishlistPlugin/Resources/config/routing.yml"
41+
resource: "@SyliusWishlistPlugin/config/routes.yaml"
4242
```
4343

44-
5. Override `SyliusShopBundle/product/common/card.html.twig` template in your project and add code below to see `Add to wishlist` button:
44+
5. Create `bundles/SyliusShopBundle/product/common` directory in your project `templates` dir if it does not exist yet:
45+
46+
```bash
47+
mkdir -p templates/bundles/SyliusShopBundle/product/common
48+
```
49+
50+
6. Copy `@SyliusShopBundle/product/common/card.html.twig` template in your project:
51+
52+
```bash
53+
cp vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/templates/product/common/card.html.twig templates/bundles/SyliusShopBundle/product/common/card.html.twig
54+
```
55+
56+
7. Add the following code to the end of the `card.html.twig` file, just before latest closing `</div>` tag:
4557

4658
```twig
4759
<hr>
4860
{% include '@SyliusWishlistPlugin/Common/_addToWishlist.html.twig' %}
4961
```
5062

51-
6. Clear application cache by using command:
63+
8. Clear application cache by using command:
5264

5365
```bash
5466
bin/console cache:clear
5567
```
5668

57-
7. Update your database
69+
9. Update your database
5870

5971
```bash
6072
bin/console doctrine:migrations:migrate
6173
```
6274

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

65-
8. Add plugin assets to your project
66-
67-
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:
68-
69-
- [Import webpack config](./01.1-webpack-config.md)*
70-
- [Add entry to existing config](./01.2-webpack-entry.md)
71-
- [Import entries in your entry.js files](./01.3-import-entry.md)
72-
- [Your own custom config](./01.4-custom-solution.md)
77+
10. Add plugin assets to your project
7378

74-
<small>* Default option for plugin development</small>
79+
Just add to your `asssets/admin/entrypoint.js` and `assets/shop/entrypoint.js` the following line (create these files if it does not exist yet):
7580

76-
77-
However, if you are not using Webpack, here are instructions on how to add optimized and compressed assets directly to your project templates:
78-
79-
- [Non webpack solution](./01.5-non-webpack.md)
81+
```javascript
82+
import '../../vendor/sylius/wishlist-bundle/assets/entrypoint';
83+
```
8084

8185
## Asynchronous Messenger case
8286

doc/01.1-webpack-config.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

doc/01.2-webpack-entry.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

doc/01.3-import-entry.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

doc/01.4-custom-solution.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

doc/01.5-non-webpack.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)