Prestashop INVALID SECURITY TOKEN 我了解风险,我真的想显示此页面
Prestashop INVALID SECURITY TOKEN I understand the risks and I really want to display this page
已创建可在将其安装到 prestashop v1.6 管理面板时创建选项卡的模块:创建选项卡和安装代码如下。请帮忙解决
class Greeting extends Module {
protected $tabs = [
[
'name' => 'Personalised Greetings',
'className' => 'AdminMkonGreetinList',
'active' => 1,
'childs' => [
[
'active' => 0,
'name' => 'List Greetings',
'className' => 'AdminMkonGreetinList',
],
],
];
//Adding Tab on Admin Section
public function addTab($tabs, $id_parent = 0) {
foreach ($tabs as $tab) {
$tabModel = new Tab();
$tabModel->module = $this->name;
$tabModel->active = $tab['active'];
$tabModel->class_name = $tab['className'];
$tabModel->id_parent = $id_parent;
//tab text in each language
foreach (Language::getLanguages(true) as $lang) {
$tabModel->name[$lang['id_lang']] = $tab['name'];
}
$tabModel->add();
//submenus of the tab
if (isset($tab['childs']) && is_array($tab['childs'])) {
$this->addTab($tab['childs'],
Tab::getIdFromClassName($tab['className']));
}
}
return true;
}
public function __construct() {
- - - - - -
}
public function install() {
if (Shop::isFeatureActive()) {
Shop::setContext(Shop::CONTEXT_ALL);
}
//add Tabs
$this->addTab($this->tabs);
if (!parent::install() || !$this->registerHook('leftColumn') ||
!$this->registerHook('header')) {
return false;
}
$this->frontMenu();
return true;
}
}
仪表板个性化问候选项卡:
单击选项卡时出现错误屏幕:
仪表板个性化问候选项卡:
单击选项卡时出现错误屏幕:
这个错误通常是由于 file(name) 和 class(name) 区分大小写的差异造成的。还需要 "controller" 后缀
AdminMkonGreetinListController.php :
Class AdminMkonGreetinListController extends ModuleAdminController
已创建可在将其安装到 prestashop v1.6 管理面板时创建选项卡的模块:创建选项卡和安装代码如下。请帮忙解决
class Greeting extends Module {
protected $tabs = [
[
'name' => 'Personalised Greetings',
'className' => 'AdminMkonGreetinList',
'active' => 1,
'childs' => [
[
'active' => 0,
'name' => 'List Greetings',
'className' => 'AdminMkonGreetinList',
],
],
];
//Adding Tab on Admin Section
public function addTab($tabs, $id_parent = 0) {
foreach ($tabs as $tab) {
$tabModel = new Tab();
$tabModel->module = $this->name;
$tabModel->active = $tab['active'];
$tabModel->class_name = $tab['className'];
$tabModel->id_parent = $id_parent;
//tab text in each language
foreach (Language::getLanguages(true) as $lang) {
$tabModel->name[$lang['id_lang']] = $tab['name'];
}
$tabModel->add();
//submenus of the tab
if (isset($tab['childs']) && is_array($tab['childs'])) {
$this->addTab($tab['childs'],
Tab::getIdFromClassName($tab['className']));
}
}
return true;
}
public function __construct() {
- - - - - -
}
public function install() {
if (Shop::isFeatureActive()) {
Shop::setContext(Shop::CONTEXT_ALL);
}
//add Tabs
$this->addTab($this->tabs);
if (!parent::install() || !$this->registerHook('leftColumn') ||
!$this->registerHook('header')) {
return false;
}
$this->frontMenu();
return true;
}
}
仪表板个性化问候选项卡:
单击选项卡时出现错误屏幕:
仪表板个性化问候选项卡: 单击选项卡时出现错误屏幕:
这个错误通常是由于 file(name) 和 class(name) 区分大小写的差异造成的。还需要 "controller" 后缀
AdminMkonGreetinListController.php :
Class AdminMkonGreetinListController extends ModuleAdminController