我正在努力使我的自定义 prestashop 模块适应 prestashop 1.6。配置页面上的工具栏按钮未显示在 1.6 上(它们确实出现在 1.5 上)并且没有给出错误消息。
1.5 中的工具栏:
1.6 中没有工具栏
有谁知道如何在 prestashop 1.6 中显示它们?这是我声明工具栏的代码片段:
$helper = new HelperForm();
// Module, token and currentIndex
$helper->module = $this;
$helper->name_controller = $this->name;
$helper->token = Tools::getAdminTokenLite('AdminModules');
$helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name;
// Language
$helper->default_form_language = $default_lang;
$helper->allow_employee_form_lang = $default_lang;
// Title and toolbar
$helper->title = $this->displayName;
$helper->show_toolbar = true;
$helper->toolbar_scroll = true; // yes - > Toolbar is always visible on the top of the screen.
$helper->submit_action = 'delete'.$this->name;
$this->uri = ToolsCore::getCurrentUrlProtocolPrefix() .$this->context->shop->domain_ssl.$this->context->shop->physical_uri;
$helper->toolbar_btn = array(
'import' => array(
'desc' => $this->l('Descargar CSV'),
'href' =>$this->uri. 'modules/' . $this->getName() . '/excel.csv',
),
'delete' => array(
'desc' => $this->l('Borrar CSV'),
'href' => AdminController::$currentIndex.'&configure='.$this->name.'&delete'.$this->name.
'&token='.Tools::getAdminTokenLite('AdminModules'),
),
'back' => array(
'href' => AdminController::$currentIndex.'&token='.Tools::getAdminTokenLite('AdminModules'),
'desc' => $this->l('Back to list')
)
);
提前致谢。