How to Add “Add to Favorites” Button on Product List in Prestashop

Mar 24, 20141000Alex Simonchik

In this article we will continue helping our blog and forum readers to expand default Prestаshоp functionalities.

We have noticed that one of our forum participants complained about certain difficulties, so we would like to share our solution with the community.

1Add to Favorites

For these purposes we have modified the following files in the module “Favorite products”:

  • modules/favoriteproducts/favoriteproducts.js
  • themes/default/product-list.tpl
  • modules/favoriteproducts/favoriteproducts.css
  • controllers/front/CategoryController.php (the function assignProductList())

To add information about the Favorite Product to our collection of products we need to modify the function аssignPrоduсtList().

Add the below code to the product-list.tpl template:

Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Vlad

The last changes are applied to the module’s css file:





Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Vlad


  1. How to Add “Add to Favorites” Button on “Home Featured”? How should i modify the code to use it in Home Featured?

  2. Distortion,

    Yes, it does’t work anymore for v1.6, and thank you for sharing the module adapted for v1.6 with the community.

  3. Denise,

    To make some module (which changes content on the category page) work properly with the Blocklayered module, you need to modify the Blocklayered module itself, that is, that the filters module would know about this data. But we do not describe this case in our article.

  4. Hello,
    I tried download categorycontroller but your link dont work. Do you know say me where I should add code in categorycontroller ?
    I tried add your code within “public function init()” and in “public function initContent()” but it dont work 100% good because if you reload page then Prestashop not remember favorite product added by the user(cookie) like when you come again to favorite product added in product page that show “remove”

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *