How To Create a Wishlist On a Category Page In Prestashop

Aug 20, 2013723
How To Create a Wishlist On a Category Page In Prestashop

As you know, designers pretty like to complicate life for programmers and frontend-developers. So once I saw some Prestashop theme design where a whishlist was displayed on a category page with products. But as you know, the default theme does not provide these options. Therefore, today’s article will describe how to add a whishlist to a category page.


So, in order to output the link which will add whishlist to a category page you need to edit the template ‘product-list.tpl’: place the below code to the most suitable part of the template.

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

In this code we change the default link behavior by introducing changes through the event ‘onclick’. WishlistCаrt is an object that is possible to use due to the js-code of the module blockwishlist (js/ajax-wishlist.js). Before using the code described above, please, make sure that the module “Wishlist block” is installed and enabled. Let’s take a closer look at the semantics of the function:

  • ‘Wishlist_blосk_list’ is the id of the block containing a whishlist for a product
  • ‘Add – action’ is the parameter which will be used in the controller ‘modules/blockwishlist/cart.php’
  • ‘{$id_product|intval}’ is a product id
  • ‘{$product.id_product_attribute}’ is an attribute id
  • 1 – quantity

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 Andrey

Post a new comment

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