Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
addcpm-json
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
addcpm-json
Commits
2248dbff
Commit
2248dbff
authored
Jan 29, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Отчет по статистике по транзакциям
parent
d72eff0c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
10 deletions
+27
-10
feeds.global.php
src/config/autoload/feeds.global.php
+4
-6
script-feeds-stat-table.js
src/public/js/script-feeds-stat-table.js
+23
-4
Statistics.php
src/src/App/Model/Statistics.php
+0
-0
No files found.
src/config/autoload/feeds.global.php
View file @
2248dbff
...
...
@@ -41,14 +41,12 @@ return [
],
'transaction'
=>
[
'title'
=>
'Транзакции'
,
'type'
=>
'feed_
stat
'
,
'type'
=>
'feed_
transactions
'
,
'fields'
=>
[
'Views'
,
'Clicks'
,
'Orders'
,
'OrderSum'
],
'cats'
=>
[
'Views'
=>
'Показы'
,
'Clicks'
=>
'Клики'
,
'Orders'
=>
'Заказы'
,
'OrderSum'
=>
'Заказы на сумму'
,
'AdMoney'
=>
'Комиссия AddCPM'
'Timestamp'
=>
'Дата и время'
,
'OrderSum'
=>
'Сумма'
,
'BasketCount'
=>
'Количество товаров'
]
/*
$cats => [
...
...
src/public/js/script-feeds-stat-table.js
View file @
2248dbff
...
...
@@ -12,10 +12,16 @@ $(document).ready(function(){
{
var
currencyFields
=
[
'admoney'
,
'salemoney'
,
'usdollarmoney'
,
'localmoney'
,
'AdMoney'
,
'OrderSum'
],
nonFormatFields
=
[
'Timestamp'
],
isCurrencyValue
=
currencyFields
.
indexOf
(
currentActiveLine
)
>
-
1
,
isNonFormatValue
=
nonFormatFields
.
indexOf
(
currentActiveLine
)
>
-
1
,
//format = (isCurrencyValue) ? d3.format(',.2f') : d3.format(',.0f');
format
=
(
isCurrencyValue
)
?
d3
.
format
(
',.0f'
)
:
d3
.
format
(
',.0f'
);
if
(
isNonFormatValue
)
{
return
value
;
}
if
(
isCurrencyValue
)
{
return
format
(
value
)
+
' грн.'
;
}
else
{
...
...
@@ -27,6 +33,9 @@ $(document).ready(function(){
function
RenderInterval
(
dataLineChartStat
)
{
var
dataPeriod
=
dataLineChartStat
[
'period'
];
var
notSumFields
=
[
'Timestamp'
];
dataTable
=
dataLineChartStat
;
...
...
@@ -36,9 +45,15 @@ $(document).ready(function(){
activeLines
.
forEach
(
function
(
item
){
currentActiveLine
=
item
;
var
totalValue
=
0
;
for
(
var
i
=
dataPeriod
.
length
-
1
;
i
>=
0
;
i
--
)
{
totalValue
+=
dataTable
[
item
][
i
];
var
isNotSumValue
=
notSumFields
.
indexOf
(
currentActiveLine
)
>
-
1
;
if
(
!
isNotSumValue
)
{
var
totalValue
=
0
;
for
(
var
i
=
dataPeriod
.
length
-
1
;
i
>=
0
;
i
--
)
{
totalValue
+=
dataTable
[
item
][
i
];
}
}
else
{
totalValue
=
''
;
}
$row
.
append
(
$
(
'<td>'
).
html
(
valueFormat
(
totalValue
)));
...
...
@@ -129,7 +144,7 @@ $(document).ready(function(){
});
console
.
log
(
'AAA TableStat render: '
,
dataLineChartStat
);
//
console.log('AAA activeLines: ', activeLines);
console
.
log
(
'AAA activeLines: '
,
activeLines
);
dataTable
=
{};
activeLines
.
forEach
(
function
(
item
){
...
...
@@ -140,6 +155,10 @@ $(document).ready(function(){
RenderInterval
(
dataLineChartStat
);
}
if
(
dataLineChartStat
.
report
==
'transaction'
)
{
RenderInterval
(
dataLineChartStat
);
}
$tableBody
.
html
(
''
).
append
(
$tableContent
.
children
());
},
...
...
src/src/App/Model/Statistics.php
View file @
2248dbff
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment