Jump to content

i want to create a page in PrestaShop 1.7, but i get a error


amaneuz

Recommended Posts

I want to create a page on PrestaShop, so I create a file in the folder controller:/contollers/front/MapageController.php

Then in this file I insert this code:

class MapageControllerCore extends FrontController
{
public $php_self = 'mapage';
public $page_name = 'ma-page';
public $ssl = true;
/**
* Initialize Ma Page controller.
*
* @see FrontController::initContent()
*/
public function initContent()
{
parent::initContent();
$this->context->smarty->assign('content_only', 0);

$this->setTemplate('costumer/mapage');
}
}

And I create a mapage.tpl file in the costum folder: /Themes/classic/templates/customer

When I view the map in the browser, I get this error:

[PrestaShopException]

No template found for costumer/mapage

at line 68 in file classes/Smarty/TemplateFinder.php

63. return $tpl;
64. }
65. }
66. }
67. 
68. throw new PrestaShopException('No template found for '.$template);
69. }
70. 
71. private function getTemplateHierarchy($template, $entity, $id)
72. {
73. $entity = basename($entity);
  • TemplateFinderCore->getTemplate - [line 1340 - classes/controller/FrontController.php] - [4 Arguments]
  • FrontControllerCore->getTemplateFile - [line 1236 -
    classes/controller/FrontController.php] - [3 Arguments]
  • FrontControllerCore->setTemplate - [line 50 -
    controllers/front/SportsHiverController.php] - [1 Arguments]
  • SportsHiverControllerCore->initContent - [line 201 -
    classes/controller/Controller.php]
  • ControllerCore->run - [line 366 - classes/Dispatcher.php]
  • DispatcherCore->dispatch - [line 28 - index.php]

someone can help me? Thank's

  • Like 1
Link to comment
Share on other sites

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...