Skip to content

Commit f0f2757

Browse files
author
Dmytro Voskoboinikov
committed
MAGETWO-65420: Update reports definitions for the Advanced Reporting service
1 parent 0737156 commit f0f2757

File tree

3 files changed

+54
-33
lines changed

3 files changed

+54
-33
lines changed

app/code/Magento/CustomerAnalytics/etc/reports.xml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,11 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Analytics:etc/reports.xsd">
99
<report name="customers" connection="default">
10-
<source name="customer_entity" alias="customer">
10+
<source name="customer_entity">
1111
<attribute name="entity_id"/>
12-
<attribute name="email"/>
13-
<attribute name="prefix"/>
14-
<attribute name="firstname"/>
15-
<attribute name="lastname"/>
16-
<attribute name="suffix"/>
17-
<attribute name="dob"/>
18-
<link-source name="customer_address_entity" alias="address" link-type="left">
19-
<attribute name="city" alias="address_city"/>
20-
<attribute name="company" alias="address_company"/>
21-
<attribute name="country_id" alias="address_country_id"/>
22-
<attribute name="firstname" alias="address_firstname"/>
23-
<attribute name="lastname" alias="address_lastname"/>
24-
<attribute name="middlename" alias="address_middlename"/>
25-
<attribute name="postcode" alias="address_postcode"/>
26-
<attribute name="prefix" alias="address_prefix"/>
27-
<attribute name="region" alias="address_region"/>
28-
<attribute name="street" alias="address_street"/>
29-
<attribute name="suffix" alias="address_suffix"/>
30-
<attribute name="telephone" alias="address_telephone"/>
31-
<using glue="and">
32-
<condition attribute="parent_id" operator="eq" type="identifier">entity_id</condition>
33-
</using>
34-
</link-source>
12+
<attribute name="created_at"/>
13+
<attribute name="email" function="sha1"/>
14+
<attribute name="store_id"/>
3515
</source>
3616
</report>
3717
</config>

app/code/Magento/SalesAnalytics/etc/analytics.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,22 @@
1515
</reportProvider>
1616
</providers>
1717
</file>
18+
<file name="order_items">
19+
<providers>
20+
<reportProvider class="Magento\Analytics\ReportXml\ReportProvider" name="order_items">
21+
<parameters>
22+
<name>order_items</name>
23+
</parameters>
24+
</reportProvider>
25+
</providers>
26+
</file>
27+
<file name="order_addresses">
28+
<providers>
29+
<reportProvider class="Magento\Analytics\ReportXml\ReportProvider" name="order_addresses">
30+
<parameters>
31+
<name>order_addresses</name>
32+
</parameters>
33+
</reportProvider>
34+
</providers>
35+
</file>
1836
</config>

app/code/Magento/SalesAnalytics/etc/reports.xml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,45 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Analytics:etc/reports.xsd">
99
<report name="orders" connection="sales">
10-
<source name="sales_order" alias="sales">
10+
<source name="sales_order">
1111
<attribute name="entity_id"/>
12+
<attribute name="created_at"/>
13+
<attribute name="customer_id"/>
14+
<attribute name="status"/>
1215
<attribute name="base_grand_total"/>
1316
<attribute name="base_tax_amount"/>
1417
<attribute name="base_shipping_amount"/>
1518
<attribute name="coupon_code"/>
19+
<attribute name="store_id"/>
20+
<attribute name="store_name"/>
21+
<attribute name="base_discount_amount"/>
22+
<attribute name="base_subtotal"/>
23+
<attribute name="base_total_refunded"/>
24+
<attribute name="shipping_method"/>
25+
<attribute name="shipping_address_id"/>
26+
<attribute name="customer_email" function="sha1"/>
27+
</source>
28+
</report>
29+
<report name="order_items" connection="sales">
30+
<source name="sales_order_item">
31+
<attribute name="item_id"/>
1632
<attribute name="created_at"/>
33+
<attribute name="name"/>
34+
<attribute name="base_price"/>
35+
<attribute name="qty_ordered"/>
36+
<attribute name="order_id"/>
37+
<attribute name="sku"/>
38+
<attribute name="product_id"/>
1739
<attribute name="store_id"/>
18-
<attribute name="email"/>
19-
<link-source name="sales_order_address" alias="billing" link-type="left">
20-
<attribute name="email"/>
21-
<using glue="and">
22-
<condition attribute="parent_id" operator="eq" type="identifier">entity_id</condition>
23-
<condition attribute="address_type" operator="eq" type="value">billing</condition>
24-
</using>
25-
</link-source>
40+
</source>
41+
</report>
42+
<report name="order_addresses" connection="sales">
43+
<source name="sales_order_address">
44+
<attribute name="entity_id"/>
45+
<attribute name="customer_id"/>
46+
<attribute name="city"/>
47+
<attribute name="region"/>
48+
<attribute name="country_id"/>
2649
</source>
2750
</report>
2851
</config>

0 commit comments

Comments
 (0)