first commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
class ControllerExtensionAnalyticsGoogle extends Controller {
|
||||
public function index() {
|
||||
return html_entity_decode($this->config->get('analytics_google_code'), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
class ControllerExtensionAnalyticsYandexMetrika extends Controller {
|
||||
public function index() {
|
||||
|
||||
$admin = false;
|
||||
|
||||
$user = false;
|
||||
|
||||
if ($this->config->get('analytics_yandex_metrika_no_admin')) {
|
||||
$this->user = new Cart\User($this->registry);
|
||||
|
||||
$admin = $this->user->isLogged();
|
||||
}
|
||||
|
||||
if ($this->config->get('analytics_yandex_metrika_no_users')) {
|
||||
$user = $this->customer->isLogged();
|
||||
}
|
||||
|
||||
if (!$admin and !$user) {
|
||||
return html_entity_decode($this->config->get('analytics_yandex_metrika_code'), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user