-
Notifications
You must be signed in to change notification settings - Fork 340
/
Copy pathdi.xml
133 lines (119 loc) · 6.36 KB
/
di.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?xml version="1.0"?>
<!--
/**
* Smile_ElasticsuiteCore dependency injection configuration.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
* versions in the future.
*
* @category Smile
* @package Smile\ElasticsuiteTracker
* @author Aurelien FOUCRET <aurelien.foucret@smile.fr>
* @copyright 2020 Smile
* @license Open Software License ("OSL") v. 3.0
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Smile\ElasticsuiteTracker\Api\EventQueueInterface" type="Smile\ElasticsuiteTracker\Model\EventQueue" />
<preference for="Smile\ElasticsuiteTracker\Api\EventIndexInterface" type="Smile\ElasticsuiteTracker\Model\EventIndex" />
<preference for="Smile\ElasticsuiteTracker\Api\SessionIndexInterface" type="Smile\ElasticsuiteTracker\Model\SessionIndex" />
<preference for="Smile\ElasticsuiteTracker\Api\CustomerTrackingServiceInterface" type="Smile\ElasticsuiteTracker\Model\Customer\TrackingService" />
<type name="Smile\ElasticsuiteTracker\Model\EventQueue">
<arguments>
<argument name="eventProcessors" xsi:type="array">
<item name="orderItems" xsi:type="object">Smile\ElasticsuiteTracker\Model\Event\Processor\OrderItems</item>
<item name="productListFilters" xsi:type="object">Smile\ElasticsuiteTracker\Model\Event\Processor\ProductListFilters</item>
<item name="searches" xsi:type="object">Smile\ElasticsuiteTracker\Model\Event\Processor\Search</item>
<item name="mapPageIdentifier" xsi:type="object">Smile\ElasticsuiteTracker\Model\Event\Processor\MapPageIdentifier</item>
</argument>
</arguments>
</type>
<type name="Magento\Quote\Model\Quote">
<plugin name="trackAddedProduct" type="Smile\ElasticsuiteTracker\Plugin\QuotePlugin" sortOrder="1" />
</type>
<type name="Smile\ElasticsuiteTracker\Model\Event\Mapping\TypeEnforcerCollector">
<arguments>
<argument name="factories" xsi:type="array">
<item name="integer" xsi:type="object">Smile\ElasticsuiteTracker\Model\Event\Mapping\TypeEnforcer\IntegerFactory</item>
<item name="double" xsi:type="object">Smile\ElasticsuiteTracker\Model\Event\Mapping\TypeEnforcer\DoubleFactory</item>
<item name="boolean" xsi:type="object">Smile\ElasticsuiteTracker\Model\Event\Mapping\TypeEnforcer\BooleanFactory</item>
</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Model\EventIndex">
<arguments>
<argument name="indexOperation" xsi:type="object">Smile\ElasticsuiteCore\Api\Index\AsyncIndexOperationInterface</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Model\SessionIndex">
<arguments>
<argument name="indexOperation" xsi:type="object">Smile\ElasticsuiteCore\Api\Index\AsyncIndexOperationInterface</argument>
</arguments>
</type>
<!-- Session proxies -->
<type name="Smile\ElasticsuiteTracker\Model\CustomerDataTrackingManager">
<arguments>
<argument name="customerSession" xsi:type="object">Magento\Customer\Model\Session\Proxy</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Model\Customer\TrackingService">
<arguments>
<argument name="customerSession" xsi:type="object">Magento\Customer\Model\Session\Proxy</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Block\Variables\Page\Order">
<arguments>
<argument name="checkoutSession" xsi:type="object">Magento\Checkout\Model\Session\Proxy</argument>
</arguments>
</type>
<type name="Magento\Framework\Console\CommandList">
<arguments>
<argument name="commands" xsi:type="array">
<item name="elasticsuiteTrackerCheckIndexedData" xsi:type="object">Smile\ElasticsuiteTracker\Console\CheckData</item>
<item name="elasticsuiteTrackerFixIndexedData" xsi:type="object">Smile\ElasticsuiteTracker\Console\FixData</item>
</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Console\CheckData">
<arguments>
<argument name="checker" xsi:type="object">Smile\ElasticsuiteTracker\Model\Data\Checker\Proxy</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Console\FixData">
<arguments>
<argument name="checker" xsi:type="object">Smile\ElasticsuiteTracker\Model\Data\Checker\Proxy</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Model\Data\Checker">
<arguments>
<argument name="checkers" xsi:type="array">
<item name="undefinedSessionIdInEvents" xsi:type="object">Smile\ElasticsuiteTracker\Model\Data\Checker\Event\UndefinedSessionId</item>
<item name="undefinedSessionIdInSessions" xsi:type="object">Smile\ElasticsuiteTracker\Model\Data\Checker\Session\UndefinedSessionId</item>
</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Model\Data\Checker\Event\UndefinedSessionId">
<arguments>
<argument name="dataFixer" xsi:type="object">\Smile\ElasticsuiteTracker\Model\Data\Fixer\Event\DeleteUndefinedSessionId</argument>
</arguments>
</type>
<type name="Smile\ElasticsuiteTracker\Model\Data\Checker\Session\UndefinedSessionId">
<arguments>
<argument name="dataFixer" xsi:type="object">Smile\ElasticsuiteTracker\Model\Data\Fixer\Session\DeleteUndefinedSessionId</argument>
</arguments>
</type>
<!-- Prevent session start for tracking urls -->
<type name="Magento\Framework\Session\SessionStartChecker">
<plugin name="elasticsuite_tracker_disable_session" type="Smile\ElasticsuiteTracker\Plugin\SessionStartCheckerPlugin"/>
</type>
<!-- Example of extending the page map identifier -->
<type name="Smile\ElasticsuiteTracker\Model\Event\Processor\MapPageIdentifier">
<arguments>
<argument name="mapping" xsi:type="array">
<item name="checkout_klarna_success" xsi:type="string">checkout_onepage_success</item>
</argument>
</arguments>
</type>
</config>