简体   繁体   English

Prestashop-将模块添加到挂钩

[英]Prestashop - Add module to hook

I want to transplant the module "blockviewed" to the hook displayFooterProduct. 我想将模块“ blockviewed”移植到钩子displayFooterProduct。

Prestashop tells me this module can't be transplanted to that hook so I looked around and found this tutorial : http://docs.promokit.eu/doku.php/prestashophelp:hookmodule Prestashop告诉我该模块无法移植到该挂钩上,因此我环顾四周并找到了本教程: http : //docs.promokit.eu/doku.php/prestashophelp : hookmodule

It came out, I have to add some code in the blockviewed.php file. 结果出来了,我必须在blockviewed.php文件中添加一些代码。

I did my best and added this code at the end. 我已尽力并在最后添加了此代码。

    public function hookdisplayFooterProduct($params) {
return $this->hookdisplayHeader('displayFooterProduct');

It doesn't work and crashes my backOffice, no wonder as I didn't completely grasp what I should put into that code. 它无法正常工作并使我的backOffice崩溃,这也就不足为奇了,因为我没有完全掌握应在该代码中添加的内容。

Could you point me out what I did wrong? 你能指出我做错了什么吗?

Thanks! 谢谢!

It is hookDisplayFooterProduct not hookdisplayFooterProduct and you should use hookRightColumn instead of hookdisplayHeader (correctly hookDisplayHeader ): 它是hookDisplayFooterProduct而不是hookdisplayFooterProduct ,您应该使用hookRightColumn而不是hookdisplayHeader (正确地是hookDisplayHeader ):

public function hookDisplayFooterProduct($params)
{
  return $this->hookRightColumn($params);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM