Jump to content

Fatal error: Class 'FrontController' not found


franklinfs

Recommended Posts

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 by franklinfs (see edit history)
Link to comment
Share on other sites

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

  • 1 month later...

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

  • 2 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...