ViachaslauSlepau Posted March 18 Share Posted March 18 Hi, I am creating a front controller for my module, but I have an error. Fatal error: Class 'ModuleFrontController' not found My file is : <?php /* /modules/ps_epos/controllers/front/callback.php */ class Ps_eposCallbackModuleFrontController extends ModuleFrontController { public function initContent() { parent::initContent(); $this->ajax = true; // enable ajax } .... } Prestashop version 8.1.7 class Ps_epos I tried ModuleFrontController, ModuleFrontControllerCore, Ps_eposCallbackFrontController, Ps_eposCallbackModuleFrontControllerCore and read documentation https://devdocs.prestashop-project.org/8/modules/concepts/controllers/front-controllers/ Any idea ? Link to comment Share on other sites More sharing options...
Prestashop Addict Posted March 18 Share Posted March 18 (edited) Dis you respect folders hierarchy? ps_epos\ controllers\ front\Callback.php nb: ps_ prefix is used normally for native ps modules Edited March 18 by Prestashop Addict (see edit history) Link to comment Share on other sites More sharing options...
ViachaslauSlepau Posted March 19 Author Share Posted March 19 (edited) Dis you respect folders hierarchy? - Yes /* /modules/ps_epos/controllers/front/callback.php */ Edited March 19 by ViachaslauSlepau delete this msg (see edit history) Link to comment Share on other sites More sharing options...
ViachaslauSlepau Posted March 19 Author Share Posted March 19 12 hours ago, Prestashop Addict said: Dis you respect folders hierarchy? ps_epos\ controllers\ front\Callback.php nb: ps_ prefix is used normally for native ps modules Did you respect folders hierarchy? - Yes /* /modules/ps_epos/controllers/front/callback.php */ Link to comment Share on other sites More sharing options...
Prestashop Addict Posted March 19 Share Posted March 19 il y a une heure, ViachaslauSlepau a dit : Did you respect folders hierarchy? - Yes /* /modules/ps_epos/controllers/front/callback.php */ You must respect class name case for file name. Link to comment Share on other sites More sharing options...
ViachaslauSlepau Posted March 19 Author Share Posted March 19 1 hour ago, Prestashop Addict said: Необходимо учитывать регистр имени класса в имени файла. After renaming the file to Callback.php the page stopped opening at all - error 404. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted March 19 Share Posted March 19 File name should be callback.php only. Try changing the class name to Ps_EposCallbackModuleFrontController Link to comment Share on other sites More sharing options...
ViachaslauSlepau Posted March 19 Author Share Posted March 19 5 minutes ago, Knowband Plugins said: File name should be callback.php only. Try changing the class name to Ps_EposCallbackModuleFrontController It doesn't work, everything is the same Link to comment Share on other sites More sharing options...
Knowband Plugins Posted March 19 Share Posted March 19 Share the URL that you are running in the browser to check the controller. Link to comment Share on other sites More sharing options...
ViachaslauSlepau Posted March 19 Author Share Posted March 19 3 minutes ago, Knowband Plugins said: Поделитесь URL-адресом, который вы открываете в браузере, чтобы проверить контроллер. https://natalisher.by/modules/ps_epos/controllers/front/callback.php Link to comment Share on other sites More sharing options...
Knowband Plugins Posted March 19 Share Posted March 19 5 minutes ago, ViachaslauSlepau said: https://natalisher.by/modules/ps_epos/controllers/front/callback.php No, that is the wrong URL that you are running. It should be like https://natalisher.by/module/ps_epos/callback Link to comment Share on other sites More sharing options...
ViachaslauSlepau Posted March 19 Author Share Posted March 19 3 minutes ago, Knowband Plugins said: No, that is the wrong URL that you are running. It should be like https://natalisher.by/module/ps_epos/callback tnx! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now