Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getDailyShopOrders example
public
function
getRatingAction
(
)
{
$shopIds
=
$this
->
getSelectedShopIds
(
)
;
$visitors
=
$this
->
getRepository
(
)
->
getDailyShopVisitors
(
$this
->
getFromDate
(
)
,
$this
->
getToDate
(
)
,
$shopIds
)
;
$visitors
=
array_map
(
'reset',
$visitors
->
getData
(
)
)
;
$orders
=
$this
->
getRepository
(
)
->
getDailyShopOrders
(
$this
->
getFromDate
(
)
,
$this
->
getToDate
(
)
,
$shopIds
)
;
$orders
=
array_map
(
'reset',
$orders
->
getData
(
)
)
;
$data
=
array_merge_recursive
(
$orders
,
$visitors
)
;
foreach
(
$data
as
$date
=> &
$row
)
{
$row
[
'date'
]
=
strtotime
(
$date
)
;
$orders
=
(int)
$row
[
'orderCount'
]
;