1
votes

I am creating a custom page /devis

So I have made a simple controller like so:

<?php

class DevisControllerCore extends FrontController
{
  public $php_self = 'devis';

  public function initContent()
  {
    $this->setTemplate('devis/devis');
    parent::initContent();
  }
 }

I have been created devis.tpl in my themes/myTheme/templates/devis/ folder

I have been added the friendly url to reach the page (/devis)

My problem is : When I reach the page

Fatal error: Uncaught Error: Class 'DevisController' not found in /var/www/vhosts/example.com/httpdocs/preprod_online/classes/controller/Controller.php:208 Stack trace: #0 /var/www/vhosts/example.com/httpdocs/preprod_online/classes/Dispatcher.php(503): ControllerCore::getController('DevisController') #1 /var/www/vhosts/example.com/httpdocs/preprod_online/index.php(28): DispatcherCore->dispatch() #2 {main} thrown in /var/www/vhosts/example.com/httpdocs/preprod_online/classes/controller/Controller.php on line 208

1

1 Answers

1
votes

The solution is to check if the name of the file is correct

structure

/controllers/front/NameController.php

and then (even if it was correctly named) Clear the cache in prestashop back office

parameters > Performances > Clear cache