I noticed, some problems in template inheritance : some typos and missing params, that causes template inheritance not working as it should be.
The core checks locations in order, for specific entities :
https://github.com/PrestaShop/PrestaShop/blob/7633be8294d90148d2bdfe3fd1c2d403e72ec91b/classes/Smarty/TemplateFinder.php#L37-L41
Unfortunately there is some typos here :
- private $productListSearchEntities = array('search', 'price-drop', 'best-sale');
+ private $productListSearchEntities = array('search', 'prices-drop', 'best-sales');
And as the param 'entity' => 'prices-drop' is not passed
from src/controllers/front/listing/PricesDropController.php
to classes/smarty/TemplateFinder.php::getTemplateHierarchy()
it causes Prestashop to find only the exact-file : catalog/listing/prices-drop and not one of the following :
catalog/listing/prices-dropcatalog/listing/product-listIf the 1st file don't exists, the "fallback template" (2) never loaded and a [PrestaShopException] No template found for catalog/listing/prices-drop is triggered.
I can make a PR if needed.
Prestashop 1.7.6.1 / PHP 7
HI @glafarge,
Thanks for your report.
Could you please add steps to reproduce the issue in a new comment.
Maybe a reference: https://devdocs.prestashop.com/1.7/themes/reference/template-inheritance/
Thanks!
Hi.
Steps :
catalog/listing/prices-drop.tplcatalog/listing/prices-drop.tplcatalog/listing/product-list.tpl is not loaded as expected in template inheritance (an error is triggered).See the causes on my first comment.
@glafarge, thanks for your feedback.
- Create a file
catalog/listing/prices-drop.tpl
This file exists by default
https://github.com/PrestaShop/PrestaShop/blob/develop/themes/classic/templates/catalog/listing/prices-drop.tpl
- Delete the file
catalog/listing/prices-drop.tpl
Now, I have this exception

Thanks to check & feedback.
@glafarge, is it the issue reproduced in your case?
Thanks!
@khouloudbelguith Yes this is the issue. I will make a PR. It'll be clearer i think.
@glafarge, thanks for your feedback and for the fix.
I have the same issue with PS1.7.5.2 and PS1.7.6.4.
I will add to the debug roadmap.
Thanks!