Jump to content

No template found for catalog/product


user5000

Recommended Posts

Hi All I have the following error with prestashop products page 1.7.2.4

Would have clue where to begin. PLEASE HELP :( my current theme "Destino" purchased from https://themeforest.net/

[PrestaShopException]

No template found for catalog/product
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 1389 - classes/controller/FrontController.php] - [4 Arguments]
    1384.         return $this->getTemplateFinder()->getTemplate(
    1385.             $template,
    1386.             $params['entity'],
    1387.             $params['id'],
    1388.             $locale
    1389.         );
    1390.     }
    1391. 
    1392.     /**
    1393.      * Renders and adds color list HTML for each product in a list.
    1394.      *
    
  • FrontControllerCore->getTemplateFile - [line 1282 - classes/controller/FrontController.php] - [3 Arguments]
    1277.      * @param string $default_template
    1278.      */
    1279.     public function setTemplate($template, $params = array(), $locale = null)
    1280.     {
    1281.         parent::setTemplate(
    1282.             $this->getTemplateFile($template, $params, $locale)
    1283.         );
    1284.     }
    1285. 
    1286.     /**
    1287.      * Removed in PrestaShop 1.7.
    
  • FrontControllerCore->setTemplate - [line 89 - controllers/front/ProductController.php] - [2 Arguments]
    84.         $id_product = (int) Tools::getValue('id_product');
    85. 
    86.         $this->setTemplate('catalog/product', array(
    87.             'entity' => 'product',
    88.             'id' => $id_product,
    89.         ));
    90. 
    91.         if ($id_product) {
    92.             $this->product = new Product($id_product, true, $this->context->language->id, $this->context->shop->id);
    93.         }
    94. 
    
  • ProductControllerCore->init - [line 186 - classes/controller/Controller.php]
    181.     /**
    182.      * Starts the controller process (this method should not be overridden!)
    183.      */
    184.     public function run()
    185.     {
    186.         $this->init();
    187.         if ($this->checkAccess()) {
    188.             // setMedia MUST be called before postProcess
    189.             if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    190.                 $this->setMedia();
    191.             }
    
  • ControllerCore->run - [line 379 - classes/Dispatcher.php]
    374.             if (isset($params_hook_action_dispatcher)) {
    375.                 Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
    376.             }
    377. 
    378.             // Running controller
    379.             $controller->run();
    380. 
    381.             // Execute hook dispatcher after
    382.             if (isset($params_hook_action_dispatcher)) {
    383.                 Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
    384.             }
    
  • DispatcherCore->dispatch - [line 28 - index.php]
    23.  * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
    24.  * International Registered Trademark & Property of PrestaShop SA
    25.  */
    26. 
    27. require(dirname(__FILE__).'/config/config.inc.php');
    28. Dispatcher::getInstance()->dispatch();
Link to comment
Share on other sites

En 4/2/2018 a las 1:58 PM, user5000 dijo:

Hi All I have the following error with prestashop products page 1.7.2.4

Would have clue where to begin. PLEASE HELP :( my current theme "Destino" purchased from https://themeforest.net/

[PrestaShopException]

No template found for catalog/product
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 1389 - classes/controller/FrontController.php] - [4 Arguments]
    
    1384.         return $this->getTemplateFinder()->getTemplate(
    1385.             $template,
    1386.             $params['entity'],
    1387.             $params['id'],
    1388.             $locale
    1389.         );
    1390.     }
    1391. 
    1392.     /**
    1393.      * Renders and adds color list HTML for each product in a list.
    1394.      *
    
  • FrontControllerCore->getTemplateFile - [line 1282 - classes/controller/FrontController.php] - [3 Arguments]
    
    1277.      * @param string $default_template
    1278.      */
    1279.     public function setTemplate($template, $params = array(), $locale = null)
    1280.     {
    1281.         parent::setTemplate(
    1282.             $this->getTemplateFile($template, $params, $locale)
    1283.         );
    1284.     }
    1285. 
    1286.     /**
    1287.      * Removed in PrestaShop 1.7.
    
  • FrontControllerCore->setTemplate - [line 89 - controllers/front/ProductController.php] - [2 Arguments]
    
    84.         $id_product = (int) Tools::getValue('id_product');
    85. 
    86.         $this->setTemplate('catalog/product', array(
    87.             'entity' => 'product',
    88.             'id' => $id_product,
    89.         ));
    90. 
    91.         if ($id_product) {
    92.             $this->product = new Product($id_product, true, $this->context->language->id, $this->context->shop->id);
    93.         }
    94. 
    
  • ProductControllerCore->init - [line 186 - classes/controller/Controller.php]
    
    181.     /**
    182.      * Starts the controller process (this method should not be overridden!)
    183.      */
    184.     public function run()
    185.     {
    186.         $this->init();
    187.         if ($this->checkAccess()) {
    188.             // setMedia MUST be called before postProcess
    189.             if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    190.                 $this->setMedia();
    191.             }
    
  • ControllerCore->run - [line 379 - classes/Dispatcher.php]
    
    374.             if (isset($params_hook_action_dispatcher)) {
    375.                 Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
    376.             }
    377. 
    378.             // Running controller
    379.             $controller->run();
    380. 
    381.             // Execute hook dispatcher after
    382.             if (isset($params_hook_action_dispatcher)) {
    383.                 Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
    384.             }
    
  • DispatcherCore->dispatch - [line 28 - index.php]
    
    23.  * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
    24.  * International Registered Trademark & Property of PrestaShop SA
    25.  */
    26. 
    27. require(dirname(__FILE__).'/config/config.inc.php');
    28. Dispatcher::getInstance()->dispatch();

 

The file is missing in your template is:

/themes/YourTemplate/templates/catalog/product.tpl

 

File.png.e3ca880a3336687fc22bf9c5676458d7.png

Check if the file was lost when uploading the template

Sorry for my English,

Edited by nadie (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 years later...
On 2/9/2018 at 4:44 PM, nadie said:

 

The file is missing in your template is:

/themes/YourTemplate/templates/catalog/product.tpl

 

File.png.e3ca880a3336687fc22bf9c5676458d7.png

Check if the file was lost when uploading the template

Sorry for my English,

Hello

I've been checking my files and this file is included. I'm having the same problem when changing the size of the product, and I can't find the way to arrange it.

Thanks for helping.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 1 month later...
  • 9 months later...
  • 4 weeks later...
  • 3 weeks later...

I'm having the same problem on prestashop 1.6 (basically not being able to scroll on category puts my production site down)

and on my local dev machine (working on 1.7.8) I have the problem with the controler search failing ?

[PrestaShopException]

No template found for C:\xampp\www\XXX/themes/XXX/search.tpl
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 1418 - classes/controller/FrontController.php] - [4 Arguments]

FrontControllerCore->getTemplateFile - [line 1312 - classes/controller/FrontController.php] - [3 Arguments]

FrontControllerCore->setTemplate - [line 141 - controllers/front/SearchController.php] - [1 Arguments]

SearchControllerCore->initContent - [line 306 - classes/controller/Controller.php]

ControllerCore->run - [line 518 - classes/Dispatcher.php]

DispatcherCore->dispatch - [line 28 - index.php]

 Please help, that one, I really cannot figure it out....

 

Link to comment
Share on other sites

  • 1 month later...
On 10/22/2021 at 9:26 PM, Gildas said:

I'm having the same problem on prestashop 1.6 (basically not being able to scroll on category puts my production site down)

and on my local dev machine (working on 1.7.8) I have the problem with the controler search failing ?

[PrestaShopException]

No template found for C:\xampp\www\XXX/themes/XXX/search.tpl
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 1418 - classes/controller/FrontController.php] - [4 Arguments]

FrontControllerCore->getTemplateFile - [line 1312 - classes/controller/FrontController.php] - [3 Arguments]

FrontControllerCore->setTemplate - [line 141 - controllers/front/SearchController.php] - [1 Arguments]

SearchControllerCore->initContent - [line 306 - classes/controller/Controller.php]

ControllerCore->run - [line 518 - classes/Dispatcher.php]

DispatcherCore->dispatch - [line 28 - index.php]

 Please help, that one, I really cannot figure it out....

 

PrestaShop 1.6 will not work in 1.7 they are different architecture

Link to comment
Share on other sites

  • 10 months later...

For those having this same issue, I found a solution to this problem here, thanks to the member kbarsotti.

I deleted the file "CategoryController.php" from the location ROOTDIR/controllers/front (after backing up the file of course).

No more 500 Server Error.

: D

  • Like 1
Link to comment
Share on other sites

  • 10 months later...
On 2/4/2018 at 1:58 PM, user5000 said:

Hi All I have the following error with prestashop products page 1.7.2.4

Would have clue where to begin. PLEASE HELP :( my current theme "Destino" purchased from https://themeforest.net/

[PrestaShopException]

No template found for catalog/product
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 1389 - classes/controller/FrontController.php] - [4 Arguments]
    1384.         return $this->getTemplateFinder()->getTemplate(
    1385.             $template,
    1386.             $params['entity'],
    1387.             $params['id'],
    1388.             $locale
    1389.         );
    1390.     }
    1391. 
    1392.     /**
    1393.      * Renders and adds color list HTML for each product in a list.
    1394.      *
    
  • FrontControllerCore->getTemplateFile - [line 1282 - classes/controller/FrontController.php] - [3 Arguments]
    1277.      * @param string $default_template
    1278.      */
    1279.     public function setTemplate($template, $params = array(), $locale = null)
    1280.     {
    1281.         parent::setTemplate(
    1282.             $this->getTemplateFile($template, $params, $locale)
    1283.         );
    1284.     }
    1285. 
    1286.     /**
    1287.      * Removed in PrestaShop 1.7.
    
  • FrontControllerCore->setTemplate - [line 89 - controllers/front/ProductController.php] - [2 Arguments]
    84.         $id_product = (int) Tools::getValue('id_product');
    85. 
    86.         $this->setTemplate('catalog/product', array(
    87.             'entity' => 'product',
    88.             'id' => $id_product,
    89.         ));
    90. 
    91.         if ($id_product) {
    92.             $this->product = new Product($id_product, true, $this->context->language->id, $this->context->shop->id);
    93.         }
    94. 
    
  • ProductControllerCore->init - [line 186 - classes/controller/Controller.php]
    181.     /**
    182.      * Starts the controller process (this method should not be overridden!)
    183.      */
    184.     public function run()
    185.     {
    186.         $this->init();
    187.         if ($this->checkAccess()) {
    188.             // setMedia MUST be called before postProcess
    189.             if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    190.                 $this->setMedia();
    191.             }
    
  • ControllerCore->run - [line 379 - classes/Dispatcher.php]
    374.             if (isset($params_hook_action_dispatcher)) {
    375.                 Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
    376.             }
    377. 
    378.             // Running controller
    379.             $controller->run();
    380. 
    381.             // Execute hook dispatcher after
    382.             if (isset($params_hook_action_dispatcher)) {
    383.                 Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
    384.             }
    
  • DispatcherCore->dispatch - [line 28 - index.php]
    23.  * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
    24.  * International Registered Trademark & Property of PrestaShop SA
    25.  */
    26. 
    27. require(dirname(__FILE__).'/config/config.inc.php');
    28. Dispatcher::getInstance()->dispatch();

Hello

Has anyone found a solution to this? I'm experiencing the exact same issue.

Thank you very much.

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