Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Ecommerce/Controller.php')
-rw-r--r--plugins/Ecommerce/Controller.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Ecommerce/Controller.php b/plugins/Ecommerce/Controller.php
index 16d324ab0d..c1716a5808 100644
--- a/plugins/Ecommerce/Controller.php
+++ b/plugins/Ecommerce/Controller.php
@@ -13,6 +13,7 @@ use Piwik\Common;
use Piwik\DataTable;
use Piwik\FrontController;
use Piwik\Piwik;
+use Piwik\Plugins\Goals\API as GoalsApi;
use Piwik\Translation\Translator;
use Piwik\View;
use Piwik\Plugins\Goals\TranslationHelper;
@@ -43,10 +44,11 @@ class Controller extends \Piwik\Plugins\Goals\Controller
$goalDefinition['name'] = $this->translator->translate('Goals_Ecommerce');
$goalDefinition['allow_multiple'] = true;
} else {
- if (!isset($this->goals[$idGoal])) {
+ $goals = GoalsApi::getInstance()->getGoals($this->idSite);
+ if (!isset($goals[$idGoal])) {
Piwik::redirectToModule('Goals', 'index', array('idGoal' => null));
}
- $goalDefinition = $this->goals[$idGoal];
+ $goalDefinition = $goals[$idGoal];
}
$this->setGeneralVariablesView($view);