在prestashop中,如何编写代码,仅对指定类别禁用模块函数

在prestashop中,如何编写代码,仅对指定类别禁用模块函数,prestashop,Prestashop,我只需要为特定类别禁用模块。我需要如何编写代码使这些类别的模块禁用。如果要为id类别4禁用模块,请执行以下操作: $id_category = (int)Tools::getValue('id_category'); if($id_category !==4){ //some code } 我需要为禁用“货到付款”模块@prestarocket编写什么代码

我只需要为特定类别禁用模块。我需要如何编写代码使这些类别的模块禁用。

如果要为id类别4禁用模块,请执行以下操作:

$id_category = (int)Tools::getValue('id_category');
if($id_category !==4){
//some code
}

我需要为禁用“货到付款”模块@prestarocket编写什么代码