PrestaShop 1.6.x. How to change default products listing view

By default, the template script displays products listing as a grid. You can switch display view to list if needed. Let’s see how to change the default product display method from Grid to List. We will change two things: JavaScript file global.js and also template file which displays products listings product-list.tpl:

zemez wordpress themes
Modification of script file
  1. All scripts in the template are stored in /js/ subdirectory of theme root directory. Open the file: /themes/themeXXXX/js/global.js, near line 175 there is a function named bindGrid(), by default it looks like the following:

Change this function to:

Theme template file modification
  1. Now it is necessary to change the default display method in the template file: product-list.tpl. This file is located in theme folder: themes/themeXXXX/produt-list.tpl.
  2. There is a code like this:
  3. Change it to:

Hopefully, this tutorial was helpful for you.

monster one