dpjw67160 2016-11-22 06:49
浏览 48
已采纳

Prestashop 1.7 hookDisplayAdminProductsExtra不工作?

I'm using the hookDisplayAdminProductsExtra hook. It's work 1.6 prestashop version. But for 1.7 don't work.

Here is the my codes

public function hookDisplayAdminProductsExtra($params)
{
    $this->smarty;

    $id_product  = Tools::getValue('id_product');

    $get_values = $this->getProductCurrencyRow($id_product);
    $this->smarty->assign('get_values',$get_values);
    $this->smarty->assign('id_product',$id_product);

    $currencies = $this->getDefaultRates();
    $this->smarty->assign('currencies',$currencies);

    return $this->display(__FILE__, '/views/templates/admin/productcurrency.tpl');
}

This codes working for prestshop 1.6 here is a screenshoot from 1.6 enter image description here

But when i install the my plugin prestashop version 1.7 i have a some problems about Admin Products Extra hook here is a screenshot from 1.7

enter image description here

New tab is come to module options name and its not hear the product options menu. hookDisplayAdminProductsExtra is changed new version? How can i fix

Thanks.

  • 写回答

2条回答 默认 最新

  • doufeinai6081 2016-11-22 15:03
    关注

    In PrestaShop 1.7 they have changed the logic for hookDisplayAdminProductsExtra hook, now all the modules using this hook will be displayed in a single tab named 'Module Options' instead of a separate tab for each module. That means you can't show a separate tab for your module in PrestaShop 1.7

    For more details about the hooks in PrestaShop you can visit the following link:

    http://build.prestashop.com/news/module-development-changes-in-17/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?