Permalink
Browse files

Merge pull request #2586 from roadster31/fix-bo-home-refresh

Fix for #2505 BackOffice dashboard refresh button
  • Loading branch information...
roadster31 committed Dec 2, 2018
2 parents 3d95d5f + ba067c9 commit aa20537160d8ae04be1d297a03f8952bde167964
Showing with 4 additions and 4 deletions.
  1. +4 −4 local/modules/HookAdminHome/Controller/HomeController.php
@@ -55,7 +55,7 @@ public function loadStatsAjaxAction()
// force flush
if ($this->getRequest()->query->get('flush', "0")) {
$cacheAdapter->deleteItem($cacheItem);
$cacheAdapter->deleteItem($cacheKey);
}
if (!$cacheItem->isHit()) {
@@ -71,17 +71,17 @@ public function loadStatsAjaxAction()
return $this->jsonResponse($cacheItem->get());
}
public function blockMonthSalesStatistics($month, $year)
{
$baseDate = sprintf("%04d-%02d", $year, $month);
$startDate = "$baseDate-01";
$endDate = date("Y-m-t", strtotime($startDate));
$prevMonthStartDate = date('Y-m-01', strtotime("$baseDate -1 month"));
$prevMonthEndDate = date("Y-m-t", strtotime($prevMonthStartDate));
return $this->render('block-month-sales-statistics', [
'startDate' => $startDate,
'endDate' => $endDate,

0 comments on commit aa20537

Please sign in to comment.