Skip to content

Commit 71adf28

Browse files
committed
Add feed plugin & update readme & encrypt token
1 parent fc3dd56 commit 71adf28

23 files changed

Lines changed: 214 additions & 58 deletions

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
"require": {
88
"php": "^8.1",
99
"bitbag/coding-standard": "^3.0",
10+
"bitbag/google-analytics-4-plugin": "^1.0",
1011
"sylius/sylius": "~1.13.0",
12+
"symfony/messenger": "^5.4 || ^6.4",
1113
"symfony/webpack-encore-bundle": "^1.15",
12-
"bitbag/google-analytics-4-plugin": "^1.0"
14+
"ext-openssl": "*",
15+
"bitbag/sylius-feed-plugin": "~0.2"
1316
},
1417
"require-dev": {
1518
"behat/behat": "^3.6.1",
@@ -34,6 +37,7 @@
3437
"phpunit/phpunit": "^10.5",
3538
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
3639
"robertfausk/behat-panther-extension": "^1.1",
40+
"setono/sylius-feed-plugin": "dev-master",
3741
"sylius-labs/coding-standard": "^4.2",
3842
"sylius-labs/suite-tags-extension": "^0.2",
3943
"symfony/browser-kit": "^5.4 || ^6.4",

config/admin_routing.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

config/bundles.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?php
22

33
return [
4+
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
5+
Setono\SyliusFeedPlugin\SetonoSyliusFeedPlugin::class => ['all' => true],
6+
Setono\DoctrineORMBatcherBundle\SetonoDoctrineORMBatcherBundle::class => ['all' => true],
47
Spinbits\SyliusGoogleAnalytics4Plugin\SpinbitsSyliusGoogleAnalytics4Plugin::class => ['all' => true],
8+
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
59
];

config/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
parameters:
22
user_com.frontend_api_key: '%env(USER_COM_FRONTEND_API_KEY)%'
3+
user_com.encryption_key: '%env(USER_COM_ENCRYPTION_KEY)%'
4+
user_com.encryption_iv: '%env(USER_COM_ENCRYPTION_IV)%'
35

46
twig:
57
globals:
@@ -9,4 +11,6 @@ imports:
911
- { resource: "state_machine/*" }
1012
- { resource: "events.yaml" }
1113
- { resource: "monolog.yaml" }
14+
- { resource: "packages/*" }
1215

16+
- { resource: "@SetonoSyliusFeedPlugin/Resources/config/app/config.yaml" }

config/packages/uid.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
framework:
2+
uid:
3+
default_uuid_version: 7
4+
time_based_uuid_version: 7
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Delete these routes and define your own shop routes here
1+
setono_sylius_feed:
2+
resource: "@SetonoSyliusFeedPlugin/Resources/config/routing.yaml"
3+
24
bitbag_user_com_customer_agreements_endpoint:
35
path: /user-com/customer-agreements
46
controller: bit_bag.sylius_user_com_plugin.controller.user_com_agreements_controller

config/services/api.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@
66
<service id="bit_bag.sylius_user_com_plugin.api.user_api" class="BitBag\SyliusUserComPlugin\Api\UserApi">
77
<argument type="service" id="http_client"/>
88
<argument type="service" id="monolog.logger.user_com"/>
9+
<argument type="service" id="bit_bag.sylius_user_com_plugin.manager.user_com_api_token_manager"/>
910
</service>
1011

1112
<service id="bit_bag.sylius_user_com_plugin.api.deal_api" class="BitBag\SyliusUserComPlugin\Api\DealApi">
1213
<argument type="service" id="http_client"/>
1314
<argument type="service" id="monolog.logger.user_com"/>
15+
<argument type="service" id="bit_bag.sylius_user_com_plugin.manager.user_com_api_token_manager"/>
1416
<argument type="service" id="bit_bag.sylius_user_com_plugin.api.user_api"/>
1517
</service>
1618

1719
<service id="bit_bag.sylius_user_com_plugin.api.product_api" class="BitBag\SyliusUserComPlugin\Api\ProductApi">
1820
<argument type="service" id="http_client"/>
1921
<argument type="service" id="monolog.logger.user_com"/>
22+
<argument type="service" id="bit_bag.sylius_user_com_plugin.manager.user_com_api_token_manager"/>
2023
</service>
2124
</services>
2225
</container>

config/services/form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</service>
1212

1313
<service id="bit_bag.sylius_user_com_plugin.form.extension.user_com_api_aware_type_extension" class="BitBag\SyliusUserComPlugin\Form\Extension\UserComApiAwareTypeExtension">
14-
<argument type="service" id="bit_bag.sylius_user_com_plugin.provider.user_com_api_aware_resource_provider"/>
14+
<argument type="service" id="bit_bag.sylius_user_com_plugin.manager.user_com_api_token_manager"/>
1515
<tag name="form.type_extension" extended-type="Sylius\Bundle\ChannelBundle\Form\Type\ChannelType" priority="200" />
1616
</service>
1717
</services>

config/services/manager.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,13 @@
1919
<argument type="service" id="bit_bag.sylius_user_com_plugin.updater.customer_without_key_updater"/>
2020
<argument type="service" id="monolog.logger.user_com"/>
2121
</service>
22+
23+
<service
24+
id="bit_bag.sylius_user_com_plugin.manager.user_com_api_token_manager"
25+
class="BitBag\SyliusUserComPlugin\Manager\UserComApiTokenManager"
26+
>
27+
<argument type="string">%user_com.encryption_key%</argument>
28+
<argument type="string">%user_com.encryption_iv%</argument>
29+
</service>
2230
</services>
2331
</container>

doc/functionalities.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Functionalities
2+
3+
## Overview
4+
The **BitBagSyliusUserComPlugin** integrates **User.com** with Sylius-based stores, enabling customer data synchronization, automated event tracking, and marketing automation capabilities.
5+
6+
## Features
7+
8+
### 1. User.com API Integration
9+
- Facilitates communication with the **User.com API** for seamless data synchronization.
10+
11+
### 2. Customer Data Synchronization
12+
- **Triggers requests to User.com** upon critical customer actions:
13+
- Providing **billing information** during checkout.
14+
- **Editing profile** from the customer account.
15+
- **Editing profile** from the admin panel.
16+
- **Customer registration**.
17+
18+
### 3. Order Tracking & Synchronization
19+
- Sends **order details** to User.com upon every state change of the **main order status**.
20+
- Ensures **real-time order tracking** and **customer behavior insights**.
21+
22+
### 4. Event-Driven System
23+
- Each customer interaction generates an **event**, which is stored and sent to **User.com** for automation and reporting.
24+
25+
### 5. Product Persistence & Feed Generation
26+
- **Persists products** within the system for accurate data reporting.
27+
- Generates a **product feed** that can be used for marketing and analytics purposes.
28+
29+
### 6. Tag Manager Script Injection
30+
- Allows users to **inject custom scripts** via **Tag Manager**.
31+
- Enables integration with **third-party tracking tools**.

0 commit comments

Comments
 (0)