diff options
Diffstat (limited to 'plugins/Ecommerce/Controller.php')
-rw-r--r-- | plugins/Ecommerce/Controller.php | 6 |
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); |