Skip to content

Commit 0f914f8

Browse files
authored
Merge pull request #94 from BitBagCommerce/OP-501
OP-501 - installation.md has been updated
2 parents c798c41 + 791ab1c commit 0f914f8

File tree

2 files changed

+104
-56
lines changed

2 files changed

+104
-56
lines changed

README.md

+14-9
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ It supports all methods available to [drop-in](https://docs.adyen.com/online-pay
111111

112112

113113
# Installation
114+
114115
For the full installation guide please go to [here](doc/installation.md).
115116

116117
----
@@ -119,17 +120,21 @@ For the full installation guide please go to [here](doc/installation.md).
119120

120121
We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.
121122

122-
| Package | Version |
123-
| --- |--------------------|
124-
| PHP | ^8.0 |
125-
| ext-json: | * |
126-
| sylius/refund-plugin | ^1.0.0 |
127-
| sylius/resource-bundle | ^1.8 |
128-
| sylius/sylius | ~1.12.0 or ~1.13.0 |
129-
| symfony/messenger | ^5.4 or ^6.0 |
130-
| adyen/php-api-library | ^11.0 |
123+
| Package | Version |
124+
|------------------------|----------------|
125+
| PHP | ^8.0 |
126+
| ext-json: | * |
127+
| sylius/refund-plugin | ^1.0.0 |
128+
| sylius/resource-bundle | ^1.8 |
129+
| sylius/sylius | ~1.12 or ~1.13 |
130+
| symfony/messenger | ^5.4 or ^6.0 |
131+
| adyen/php-api-library | ^11.0 |
131132

132133
----
134+
135+
### Full installation guide
136+
- [See the full installation guide](doc/installation.md)
137+
133138
## Customization
134139
----
135140
##### You can [decorate](https://symfony.com/doc/current/service_container/service_decoration.html) available services and [extend](https://symfony.com/doc/current/form/create_form_type_extension.html) current forms.

doc/installation.md

+90-47
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,53 @@
1-
## Installation
2-
3-
1. Complete [refund plug-in](https://github.com/Sylius/RefundPlugin) installation steps
4-
5-
2. Require with composer
6-
1+
# Installation
2+
3+
## Overview:
4+
GENERAL
5+
- [Requirements](#requirements)
6+
- [Composer](#composer)
7+
- [Basic configuration](#basic-configuration)
8+
---
9+
FRONTEND
10+
- [Templates](#templates)
11+
- [Webpack](#webpack)
12+
---
13+
ADDITIONAL
14+
- [Additional configuration](#additional-configuration)
15+
- [Known Issues](#known-issues)
16+
---
17+
18+
## Requirements:
19+
### Installed BitBagRefundPlugin
20+
Complete installation instructions for the BitBagRefundPlugin can be found here:
21+
22+
- [BitBagRefundPlugin installation](https://github.com/Sylius/RefundPlugin)
23+
24+
We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.
25+
26+
| Package | Version |
27+
|---------------|-----------------|
28+
| PHP | \>8.0 |
29+
| sylius/sylius | 1.12.x - 1.13.x |
30+
| MySQL | \>= 5.7 |
31+
| NodeJS | \>= 18.x |
32+
33+
## Composer:
734
```bash
835
composer require bitbag/sylius-adyen-plugin --no-scripts
936
```
10-
3. When using Symfony flex the proper bundle class will be automatically registered in your bundles.php file. Otherwise, add it to your `config/bundles.php` file:
37+
38+
## Basic configuration:
39+
Add plugin dependencies to your `config/bundles.php` file:
1140

1241
```php
42+
# config/bundles.php
43+
1344
return [
14-
// ...
45+
...
1546
BitBag\SyliusAdyenPlugin\BitBagSyliusAdyenPlugin::class => ['all' => true],
1647
];
1748
```
1849

19-
4. Import required config in your `config/packages/_sylius.yaml` file:
50+
Import required config in your `config/packages/_sylius.yaml` file:
2051

2152
```yaml
2253
# config/packages/_sylius.yaml
@@ -26,18 +57,28 @@ imports:
2657
- { resource: "@BitBagSyliusAdyenPlugin/Resources/config/config.yaml" }
2758
```
2859
29-
5. Import the routing in your `config/routes.yaml` file:
60+
Add Adyen payment method as a supported refund gateway in `config/packages/_sylius.yaml`:
61+
```yaml
62+
# config/packages/_sylius.yaml
63+
64+
parameters:
65+
sylius_refund.supported_gateways:
66+
- offline
67+
- adyen
68+
```
3069

70+
Import routing in your `config/routes.yaml` file:
3171
```yaml
3272
# config/routes.yaml
3373
3474
bitbag_sylius_adyen_plugin:
3575
resource: "@BitBagSyliusAdyenPlugin/Resources/config/routing.yaml"
3676
```
3777

38-
6. Add logging to your environment in config/packages/{dev, prod, staging}/monolog.yaml
39-
78+
Add logging to your environment in config/packages/{dev, prod, staging}/monolog.yaml
4079
```yaml
80+
# config/packages/{dev, prod, staging}/monolog.yaml
81+
4182
monolog:
4283
channels: [adyen]
4384
handlers: # Add alongside other handlers you might have
@@ -47,56 +88,58 @@ monolog:
4788
id: bitbag.sylius_adyen_plugin.logging.monolog.doctrine_handler
4889
```
4990

50-
7. Add Adyen payment method as a supported refund gateway in `config/packages/_sylius.yaml`
51-
52-
```yaml
53-
# config/packages/_sylius.yaml
54-
55-
parameters:
56-
sylius_refund.supported_gateways:
57-
- offline
58-
- adyen
91+
### Update your database
92+
First, please run legacy-versioned migrations by using command:
93+
```bash
94+
bin/console doctrine:migrations:migrate
5995
```
6096

61-
8. Configure config/packages/webpack_encore.yaml
62-
```yaml
63-
builds:
64-
*: *
65-
shop: '%kernel.project_dir%/public/build/shop'
66-
admin: '%kernel.project_dir%/public/build/admin'
97+
After migration, please create a new diff migration and update database:
98+
```bash
99+
bin/console doctrine:migrations:diff
100+
bin/console doctrine:migrations:migrate
67101
```
102+
### Clear application cache by using command:
103+
```bash
104+
bin/console cache:clear
105+
```
106+
**Note:** If you are running it on production, add the `-e prod` flag to this command.
68107

69-
9. Copy Sylius templates overridden by plug-in to your templates directory (`templates/bundles/`):
108+
## Templates
109+
Copy required templates into correct directories in your project.
70110

111+
**AdminBundle** (`templates/bundles/SyliusAdminBundle`):
71112
```
72-
mkdir -p templates/bundles/SyliusAdminBundle/
73-
mkdir -p templates/bundles/SyliusShopBundle/
74-
75-
cp -R vendor/bitbag/sylius-adyen-plugin/tests/Application/templates/bundles/SyliusAdminBundle/* templates/bundles/SyliusAdminBundle/
76-
cp -R vendor/bitbag/sylius-adyen-plugin/tests/Application/templates/bundles/SyliusShopBundle/* templates/bundles/SyliusShopBundle/
113+
vendor/bitbag/sylius-adyen-plugin/tests/Application/templates/bundles/SyliusAdminBundle/Order/Show/_payment.html.twig
114+
vendor/bitbag/sylius-adyen-plugin/tests/Application/templates/bundles/SyliusAdminBundle/Order/Show/_payments.html.twig
77115
```
78116
79-
10. Execute migrations
80-
117+
**ShopBundle** (`templates/bundles/SyliusShopBundle`):
81118
```
82-
bin/console doctrine:migrations:migrate
119+
vendor/bitbag/sylius-adyen-plugin/tests/Application/templates/bundles/SyliusShopBundle/Checkout/Complete/_navigation.html.twig
120+
vendor/bitbag/sylius-adyen-plugin/tests/Application/templates/bundles/SyliusShopBundle/Checkout/SelectPayment/_payment.html.twig
83121
```
84122
85-
11. Install assets
86-
87-
```
123+
Install assets:
124+
```bash
88125
bin/console assets:install
89126
```
90127

91-
12. Clear cache
92-
93-
```
94-
bin/console cache:clear
128+
## Webpack
129+
### Run commands
130+
```bash
131+
yarn install
132+
yarn encore dev # or prod, depends on your environment
95133
```
96134

97-
**Note:** If you are running it on production, add the `-e prod` flag to this command.
98-
99-
13. [Obtain Adyen credentials and configure the payment method](configuration.md)
135+
## Additional configuration
136+
- [Obtain Adyen credentials and configure the payment method](https://github.com/BitBagCommerce/SyliusAdyenPlugin/blob/master/doc/configuration.md)
100137

138+
If you want to access the log page, visit /adyen/log.
101139

102-
14. If you want to access the log page, visit /adyen/log.
140+
## Known issues
141+
### Translations not displaying correctly
142+
For incorrectly displayed translations, execute the command:
143+
```bash
144+
bin/console cache:clear
145+
```

0 commit comments

Comments
 (0)