Get Free Audit

How To Create a Wishlist On a Category Page In Prestashop

Aug 20, 2013

3316 Alex Simonchik

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

PrestaShop Support & Maintenance

Take your online store to the next level with BelVG PrestaShop Support & Maintenance

Visit the page
Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. 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 *