File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- spinbits_sylius_google_analytics4 :
2- id : ' %env(TAG_MANAGER_ID)%'
3-
41parameters :
52 user_com.frontend_api_key : ' %env(USER_COM_FRONTEND_API_KEY)%'
63
Original file line number Diff line number Diff line change 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 ...
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 {
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)%"
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments