What controller is used for product list on main page in Prestashop

2.4k views Asked by At

I have some discounts depending on stock quantity and would like to show the lowest price for each product on product list page (both in categories and on main page).

So I found this tutorial that explains how this behavior can be achieved.

So I created override behavior for both CategoryController and ProductController but changes aren't displayed on main page.

Product List on main page uses the same template, product-list.tpl but controller is obviously different. And I can't figure out which one I should override now.

1

There are 1 answers

0
Dmitrii Mikhailov On

Product list on main page is displayed by HomeFeatured plugin, so to alter Product objects on main page I had to add extra code to _cacheProducts() method and alter HomeFeatured::$cache_products there.

I had to do that right in my plugin code since my Prestashop version is 1.6.0.8 and module overriding is available only since 1.6.0.11 release.