-
Notifications
You must be signed in to change notification settings - Fork 0
/
di.xml
76 lines (71 loc) · 5.42 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
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Catalog\Block\Category\View" type="BoxalinoClientProject\BoxalinoIntegration\Block\Api\Navigation"/>
<preference for="Magento\CatalogSearch\Block\Result" type="BoxalinoClientProject\BoxalinoIntegration\Block\Api\Search"/>
<!-- PDP recommendations (strategy A) -->
<preference for="Magento\Catalog\Block\Product\ProductList\Related" type="BoxalinoClientProject\BoxalinoIntegration\Block\Api\Product\Related"/>
<!-- PDP recommendations (strategy C) -->
<preference for="Magento\Checkout\Block\Cart\Crosssell" type="BoxalinoClientProject\BoxalinoIntegration\Block\Api\Product\Crosssell"/>
<!-- registry-mock to access available API response structures -->
<preference for="Boxalino\RealTimeUserExperience\Api\CurrentApiResponseRegistryInterface" type="Boxalino\RealTimeUserExperience\Registry\CurrentApiResponse"/>
<preference for="Boxalino\RealTimeUserExperience\Api\CurrentApiResponseViewRegistryInterface" type="Boxalino\RealTimeUserExperience\Registry\CurrentApiResponseView"/>
<preference for="Boxalino\RealTimeUserExperience\Api\ApiFilterablePropertiesProviderInterface" type="Boxalino\RealTimeUserExperience\Model\ResourceModel\Api\Context\FrameworkFilterableAttribute"/>
<!-- the sorting model must be declared for the integration to work; even in absence of use, the default provided one can be used -->
<preference for="Boxalino\RealTimeUserExperienceApi\Framework\Content\Listing\ApiSortingModelInterface" type="Boxalino\RealTimeUserExperience\Model\Response\Content\ApiSorting"/>
<type name="Boxalino\RealTimeUserExperience\Model\Response\Content\ApiSorting">
<arguments>
<argument name="sortingList" xsi:type="array">
<item name="position" xsi:type="array">
<item name="field" xsi:type="string">position</item>
<item name="direction" xsi:type="string">asc</item>
<item name="label" xsi:type="string">Recommended</item>
<item name="api-field" xsi:type="string">position</item>
<item name="reverse" xsi:type="boolean">false</item>
</item>
<item name="price-asc" xsi:type="array">
<item name="field" xsi:type="string">price</item>
<item name="direction" xsi:type="string">asc</item>
<item name="label" xsi:type="string">Price: low to high</item>
<item name="api-field" xsi:type="string">discountedPrice</item>
<item name="reverse" xsi:type="boolean">false</item>
</item>
<item name="price-desc" xsi:type="array">
<item name="field" xsi:type="string">price</item>
<item name="direction" xsi:type="string">desc</item>
<item name="label" xsi:type="string">Price: high to low</item>
<item name="api-field" xsi:type="string">discountedPrice</item>
<item name="reverse" xsi:type="boolean">true</item>
</item>
<item name="newest" xsi:type="array">
<item name="field" xsi:type="string">entity_id</item>
<item name="direction" xsi:type="string">desc</item>
<item name="label" xsi:type="string">New arrivals</item>
<item name="api-field" xsi:type="string">id</item>
<item name="reverse" xsi:type="boolean">true</item>
</item>
</argument>
<!-- configure additional sorting fields (extras to the selected sorting option) -->
<!-- <argument name="additionalSortingList" xsi:type="array">-->
<!-- <item name="price-asc" xsi:type="array">-->
<!-- <item name="api-field" xsi:type="string">products_bx_hasprice</item>-->
<!-- <item name="reverse" xsi:type="boolean">false</item>-->
<!-- </item>-->
<!-- </argument>-->
</arguments>
</type>
<!-- configuration for the facet values delimiter in the URL -->
<!-- <type name="Boxalino\RealTimeUserExperience\Model\Response\Content\ApiFacet">-->
<!-- <arguments>-->
<!-- default: | ; enable this in order to set a different facetValueDelimiter -->
<!-- <argument name="facetValuesDelimiter" xsi:type="string">|</argument>-->
<!-- default: false ; enable this to allow the system to filter facets by option ID -->
<!-- <argument name="useFacetOptionIdFilter" xsi:type="string">true</argument>-->
<!-- default: bx_ ; our recommendation is to always use a facet prefix (ex: api_ or bx_ ) in order to avoid wrongfully applied filters in API request -->
<!-- <argument name="facetPrefix" xsi:type="string">api_</argument>-->
<!-- default: value ; enable this to allow the system to use a different facet correlation as facet value -->
<!-- <argument name="facetValueKey" xsi:type="string">key</argument>-->
<!-- </arguments>-->
<!-- </type>-->
<!-- rewrite default search -->
<preference for="Magento\CatalogSearch\Controller\Result\Index" type="BoxalinoClientProject\BoxalinoIntegration\Controller\Result\Index" />
</config>