Skip to content

Commit c4f1e40

Browse files
committed
Update docs
1 parent cf00d9d commit c4f1e40

1 file changed

Lines changed: 31 additions & 36 deletions

File tree

doc/installation.md

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33
```bash
44
composer require bitbag/user-com-plugin
55
```
6-
2. Add required environment variables to your `.env` file:
7-
```dotenv
8-
USER_COM_FRONTEND_API_KEY=""
9-
TAG_MANAGER_ID=""
10-
USER_COM_ENCRYPTION_KEY=your-32-character-long-key
11-
USER_COM_ENCRYPTION_IV=your-16-character-long-iv
12-
```
13-
3. Add plugin dependencies to config/bundles.php file:
14-
```php
15-
return [
16-
...
17-
BitBag\SyliusUserComPlugin\BitBagSyliusUserComPlugin::class => ['all' => true],
18-
Spinbits\SyliusGoogleAnalytics4Plugin\SpinbitsSyliusGoogleAnalytics4Plugin::class => ['all' => true],
19-
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
20-
Setono\SyliusFeedPlugin\SetonoSyliusFeedPlugin::class => ['all' => true],
21-
Setono\DoctrineORMBatcherBundle\SetonoDoctrineORMBatcherBundle::class => ['all' => true],
22-
//Sylius grid bundle should be under Setono\SyliusFeedPlugin\SetonoSyliusFeedPlugin
23-
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
24-
...
25-
];
26-
```
6+
2. Add required environment variables to your `.env` file:
7+
```dotenv
8+
USER_COM_FRONTEND_API_KEY=""
9+
TAG_MANAGER_ID=""
10+
USER_COM_ENCRYPTION_KEY=your-32-character-long-key
11+
USER_COM_ENCRYPTION_IV=your-16-character-long-iv
12+
```
13+
3. Add plugin dependencies to `config/bundles.php` file. Make sure that none of the bundles are duplicated.
14+
```php
15+
return [
16+
...
17+
BitBag\SyliusUserComPlugin\BitBagSyliusUserComPlugin::class => ['all' => true],
18+
Spinbits\SyliusGoogleAnalytics4Plugin\SpinbitsSyliusGoogleAnalytics4Plugin::class => ['all' => true],
19+
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
20+
Setono\SyliusFeedPlugin\SetonoSyliusFeedPlugin::class => ['all' => true],
21+
Setono\DoctrineORMBatcherBundle\SetonoDoctrineORMBatcherBundle::class => ['all' => true],
22+
//Sylius grid bundle should be under Setono\SyliusFeedPlugin\SetonoSyliusFeedPlugin
23+
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
24+
...
25+
];
26+
```
2727
4. Import required config in your `config/packages/_sylius.yaml` file:
2828
```yaml
2929
imports:
@@ -32,33 +32,28 @@
3232
...
3333
```
3434
35-
4. Import routes in your `config/routes.yaml` file:
36-
```yaml
37-
bitbag_sylius_user_com_plugin:
38-
resource: "@BitBagSyliusUserComPlugin/config/routes.yaml"
39-
```
35+
4. Import routes in your `config/routes.yaml` file:
36+
```yaml
37+
bitbag_sylius_user_com_plugin:
38+
resource: "@BitBagSyliusUserComPlugin/config/routes.yaml"
39+
```
4040
4141
5. Extend `Channel` entity `UserComApiAwareTrait` and implement `UserComApiAwareInterface`
42-
```php
43-
class Channel extends BaseChannel implements ChannelInterface
42+
```php
43+
use BitBag\SyliusUserComPlugin\Trait\UserComApiAwareTrait;
44+
use BitBag\SyliusUserComPlugin\Trait\UserComApiAwareInterface;
45+
...
46+
class Channel extends BaseChannel implements UserComApiAwareInterface
4447
{
4548
use UserComApiAwareTrait;
4649
}
4750
```
4851
49-
```php
50-
interface ChannelInterface extends BaseChannelInterface, UserComApiAwareInterface
51-
{
52-
}
53-
```
5452
>`UserComApiAwareTrait` contains mapping for annotations and for attributes which are required by UserCom integration.
5553
> If you're using xml mapping, you should add mapping for those properties in your `Channel.orm.xml` file.
5654
5755
6. Take advantage of channel based configuration of GoogleAnalyticsPlugin by adding :
5856
```yaml
5957
spinbits_sylius_google_analytics4:
6058
id: "%env(TAG_MANAGER_ID)%"
61-
channels_ids:
62-
FASHION_WEB: "G-DF1P3RRJ8S"
63-
OTHER_CHANNEL: "G-WX1RJ8SP3R"
6459
```

0 commit comments

Comments
 (0)