【发布时间】:2016-03-23 10:17:02
【问题描述】:
我为 prestashop 创建了自己的模块(目前非常基本)。
我想为产品添加一些自定义(类似于 Attribute Wizard Pro ) 最终目标:我希望我的模块根据产品所在的类别在产品页面上显示一个小表格(每个类别的表格略有不同) - 并且在购买产品时会保存该表格的结果。
我想将表单放入 RightColumnProduct - 我可以通过在此挂钩中访问它并调用我创建的 TPL 来做到这一点。
public function hookDisplayRightColumnProduct()
{
/* Place your code here. */
/*Get the Current Category name to see which TPL to show*/
return $this->display(__FILE__,'views/hooks/mytpl.tpl');
}
我需要做的是访问当前产品的类别名称,但事实证明这很难做到。
我尝试了各种解决方案都没有成功。
【问题讨论】:
标签: php module prestashop prestashop-1.6