Get name of module in PrestaShop front controller
问题 In PrestaShop (specifically v1.7.5) one can get an instance of the module class by calling $module = Module::getInstanceByName('theModuleName'); in the controller of a custom module. Is 'theModuleName' available via some other setting or variable or does it need to be hardcoded? It should also be used as first parameter to getModuleLink(). 回答1: You can access the module name (along with the rest from the module class) by: $theModuleName = $this->module->name; Using Prestashop core module