-
Notifications
You must be signed in to change notification settings - Fork 9.3k
/
widget_recently_viewed.xml
147 lines (147 loc) · 9.14 KB
/
widget_recently_viewed.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">widget_recently_viewed.recently_viewed_datasource</item>
</item>
</argument>
<settings>
<deps>
<dep>widget_recently_viewed.recently_viewed_datasource</dep>
</deps>
<spinner>widget_columns</spinner>
</settings>
<dataSource name="recently_viewed_datasource" component="Magento_Catalog/js/product/provider">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="productStorageConfig" xsi:type="array">
<item name="namespace" xsi:type="string">product_data_storage</item>
<item name="className" xsi:type="string">DataStorage</item>
<item name="updateRequestConfig" xsi:type="array">
<item name="url" xsi:type="serviceUrl" path="/products-render-info"/>
</item>
</item>
<item name="identifiersConfig" xsi:type="array">
<item name="namespace" xsi:type="string">recently_viewed_product</item>
</item>
<item name="scopeConfig" xsi:type="object">Magento\Framework\App\Config\ScopeConfigInterface</item>
</item>
</argument>
</argument>
<dataProvider class="\Magento\Catalog\Ui\DataProvider\Product\Listing\DataProvider" name="recently_viewed_datasource">
<settings>
<requestFieldName/>
<primaryFieldName/>
</settings>
</dataProvider>
</dataSource>
<columns name="widget_columns" component="Magento_Catalog/js/product/list/listing" template="Magento_Catalog/product/list/listing">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Recently Viewed</item>
<item name="additionalClasses" xsi:type="string">widget block-viewed-products-grid</item>
<item name="listTemplate" xsi:type="string">Magento_Catalog/product/list/listing</item>
</item>
</argument>
<settings>
<displayMode>grid</displayMode>
</settings>
<column name="image" component="Magento_Catalog/js/product/list/columns/image" sortOrder="0" displayArea="general-area">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="imageCode" xsi:type="string">recently_viewed_products_grid_content_widget</item>
</item>
</argument>
<settings>
<label translate="true">Image</label>
<bodyTmpl>Magento_Catalog/product/list/columns/image_with_borders</bodyTmpl>
</settings>
</column>
<column name="name" component="Magento_Catalog/js/product/name" sortOrder="1" displayArea="details-area">
<settings>
<label translate="true">Name</label>
<bodyTmpl>Magento_Catalog/product/name</bodyTmpl>
</settings>
</column>
<column name="price" component="Magento_Catalog/js/product/list/columns/price-box" sortOrder="3" displayArea="details-area">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="renders" xsi:type="array">
<item name="prices" xsi:type="array">
<item name="default" xsi:type="array">
<item name="component" xsi:type="string">Magento_Catalog/js/product/list/columns/pricetype-box</item>
<item name="bodyTmpl" xsi:type="string">Magento_Catalog/product/final_price</item>
<item name="children" xsi:type="array">
<item name="special_price" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Special Price</item>
<item name="component" xsi:type="string">Magento_Catalog/js/product/list/columns/final-price</item>
<item name="bodyTmpl" xsi:type="string">Magento_Catalog/product/price/special_price</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
<item name="regular_price" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Regular Price</item>
<item name="component" xsi:type="string">Magento_Catalog/js/product/list/columns/final-price</item>
<item name="bodyTmpl" xsi:type="string">Magento_Catalog/product/price/regular_price</item>
<item name="sortOrder" xsi:type="number">2</item>
</item>
<item name="minimal_price" xsi:type="array">
<item name="label" xsi:type="string" translate="true"/>
<item name="component" xsi:type="string">Magento_Catalog/js/product/list/columns/final-price</item>
<item name="bodyTmpl" xsi:type="string">Magento_Catalog/product/price/minimal_price</item>
<item name="sortOrder" xsi:type="number">3</item>
</item>
<item name="minimal_regular_price" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Regular Price</item>
<item name="component" xsi:type="string">Magento_Catalog/js/product/list/columns/final-price</item>
<item name="bodyTmpl" xsi:type="string">Magento_Catalog/product/price/minimal_regular_price</item>
<item name="sortOrder" xsi:type="number">4</item>
</item>
<item name="max_price" xsi:type="array">
<item name="label" xsi:type="string" translate="true"/>
<item name="component" xsi:type="string">Magento_Catalog/js/product/list/columns/final-price</item>
<item name="bodyTmpl" xsi:type="string">Magento_Catalog/product/price/max_price</item>
<item name="sortOrder" xsi:type="number">5</item>
</item>
<item name="max_regular_price" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Regular Price</item>
<item name="component" xsi:type="string">Magento_Catalog/js/product/list/columns/final-price</item>
<item name="bodyTmpl" xsi:type="string">Magento_Catalog/product/price/max_regular_price</item>
<item name="sortOrder" xsi:type="number">6</item>
</item>
</item>
</item>
</item>
</item>
</item>
</argument>
<settings>
<label translate="true">Price</label>
</settings>
</column>
<column name="addtocart-button" component="Magento_Catalog/js/product/addtocart-button" displayArea="action-primary-area">
<settings>
<label translate="true">Add To Cart</label>
<bodyTmpl>Magento_Catalog/product/addtocart-button</bodyTmpl>
</settings>
</column>
<column name="addtocompare-button" component="Magento_Catalog/js/product/addtocompare-button" sortOrder="2" displayArea="action-secondary-area">
<settings>
<label translate="true">Add To Compare</label>
<bodyTmpl>Magento_Catalog/product/addtocompare-button</bodyTmpl>
</settings>
</column>
<column name="learn-more" component="Magento_Catalog/js/product/learn-more" displayArea="description-area">
<settings>
<label translate="true">Learn more</label>
<bodyTmpl>Magento_Catalog/product/link</bodyTmpl>
</settings>
</column>
</columns>
</listing>