franklinfs Posted March 27, 2014 Share Posted March 27, 2014 (edited) Hai I am trying to create a controller file. my controller code is <?php class TestController extends FrontController { public function init() { parent::init(); } public function getPrice() { {some query} } } ?> when i access this controller, i am getting the error,like Fatal error: Class 'FrontController' not found. How can i solve this? Edited March 27, 2014 by franklinfs (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted March 27, 2014 Share Posted March 27, 2014 use this instead class FrontController extends FrontControllerCore and rename you test controller to FrontController Link to comment Share on other sites More sharing options...
franklinfs Posted March 28, 2014 Author Share Posted March 28, 2014 Hello Patron thanks for your reply. Now itself i am getting the same error. Fatal error: Class 'FrontControllerCore' not found in ....\front\FrontController.php on line 3 I will expalin my requirement. I have the following ajax code in product.tpl file <script> function getQuote(id) { $.ajax({ type: 'POST', url: '{$base_url}controllers/front/FrontController.php', data: 'method=getPrice&id_product='+id, success: function(data) { $("#quoteblock").html(data); } }); } </script> In my controller <?php class FrontController extends FrontControllerCore { public function init() { parent::init(); } public function getPrice() { {some query} } } ?> Link to comment Share on other sites More sharing options...
dorosa Posted May 5, 2014 Share Posted May 5, 2014 Hello, I have similar problem: Fatal error: Class 'FrontController' not found in ...public_html/modules/authorizeaim/backward_compatibility/Display.php on line 7: <?php /*** Class allow to display tpl on the FO*/class BWDisplay extends FrontController{ // Assign template, on 1.4 create it else assign for 1.5 public function setTemplate($template) { if (_PS_VERSION_ >= '1.5') parent::setTemplate($template); else $this->template = $template; } // Overload displayContent for 1.4 public function displayContent() { parent::displayContent(); echo Context::getContext()->smarty->fetch($this->template); Could you give some suggestion, please, how to resolve it because i can't access the modules Link to comment Share on other sites More sharing options...
Donat Posted May 11, 2016 Share Posted May 11, 2016 Hello) How did you solve the problem??? 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