Skip to content

Commit f050bbf

Browse files
committed
Adjust doctrine mapping
1 parent c6cdc33 commit f050bbf

3 files changed

Lines changed: 15 additions & 17 deletions

File tree

config/config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
spinbits_sylius_google_analytics4:
2-
id: '%env(TAG_MANAGER_ID)%'
3-
41
parameters:
52
user_com.frontend_api_key: '%env(USER_COM_FRONTEND_API_KEY)%'
63

doc/installation.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,17 @@
99
> {
1010
> "type": "vcs",
1111
> "url": "https://github.com/BitBagCommerce/SyliusUserComPlugin.git"
12-
> }
13-
> ]
12+
> },
13+
> { }
14+
>
15+
> ],
1416
> ```
15-
2. Add plugin dependencies to config/bundles.php file:
17+
2. Add required environment variables to your `.env` file:
18+
```dotenv
19+
USER_COM_FRONTEND_API_KEY=""
20+
TAG_MANAGER_ID=""
21+
```
22+
3. Add plugin dependencies to config/bundles.php file:
1623
```php
1724
return [
1825
...
@@ -21,14 +28,14 @@
2128
...
2229
];
2330
```
24-
3. Import required config in your `config/packages/_sylius.yaml` file:
31+
4. Import required config in your `config/packages/_sylius.yaml` file:
2532
```yaml
2633
imports:
2734
...
2835
- { resource: "@BitBagSyliusUserComPlugin/config/config.yml" }
2936
...
3037
```
31-
4. Extend `Channel` entity `UserComApiAwareTrait` and implement `UserComApiAwareInterface`
38+
5. Extend `Channel` entity `UserComApiAwareTrait` and implement `UserComApiAwareInterface`
3239
```php
3340
class Channel extends BaseChannel implements ChannelInterface
3441
{
@@ -44,13 +51,7 @@
4451
>`UserComApiAwareTrait` contains mapping for annotations and for attributes which are required by UserCom integration.
4552
> If you're using xml mapping, you should add mapping for those properties in your `Channel.orm.xml` file.
4653
47-
5. Add required environment variables to your `.env` file:
48-
```dotenv
49-
USER_COM_FRONTEND_API_KEY=""
50-
TAG_MANAGER_ID=""
51-
```
52-
53-
6. *Optional* - take advantage of channel based configuration of Google Tag Manager ID:
54+
6. Take advantage of channel based configuration of GoogleAnalyticsPlugin by adding :
5455
```yaml
5556
spinbits_sylius_google_analytics4:
5657
id: "%env(TAG_MANAGER_ID)%"

src/Trait/UserComApiAwareTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ trait UserComApiAwareTrait
1919
/** @ORM\Column(name="user_com_url", type="string", nullable=true) */
2020
private ?string $userComUrl;
2121

22-
#[ORM\Column(name: 'user_com_url', type: 'string', nullable: true)]
23-
/** @ORM\Column(name="user_com_url", type="string", nullable=true) */
22+
#[ORM\Column(name: 'user_com_api_key', type: 'string', nullable: true)]
23+
/** @ORM\Column(name="user_com_api_key", type="string", nullable=true) */
2424
private ?string $userComApiKey;
2525

2626
public function getUserComUrl(): ?string

0 commit comments

Comments
 (0)