Prestashop 1.6 Theme Hints: Columns Management

Prestashop 1.6 Theme Hints: Columns Management

Prestаshоp version 1.6 allows you to manage theme columns directly from your backoffice. In this article we will describe how this algorithm functions and will provide a code sample, which will output one column on the Manufacturer controller page and also when viewing goods of a certain brand, although the theme configuration will be set to 2 columns. This task we received from one of our customers, who had provided us with different versions of design for one and the same Manufacturer controller.

Theme columns are managed under the following address: Preferences->Themes

1prestashop-1-6-theme-hints-columns-management

You can also manage the columns for each controller separately:

2prestashop-1-6-theme-hints-columns-management

The settings are stored in the database in the following table: ps_theme_meta:

3prestashop-1-6-theme-hints-columns-management

Where id_theme_metа is the id of the settings:

id_theme – theme ID (the data is stored in the table ps_meta, see the picture below)

id_meta – controller ID

left_column – left column setting

right_column – right column setting

4prestashop-1-6-theme-hints-columns-management

Prestashop uses the class Theme to work with the store theme.  You can see the list of available properties and methods in  this file: classes/Theme.php

The following properties are responsible for setting up column rendering in the controllers: display_column_left and display_column_right. For one of our customers we have overriden the MаnufасturerCоntrоller in order to modify the behavior of the columns settings when all products of a certain manufacturer are being viewed. So now global controller settings are configured in the admin panel, but if you  view a particular brand this enables the custom logic which turns off the columns:



2 comments

  1. How can i disable left column only on home page?
    My Prestashop is 1.6.0.6

  2. Sérgio Martins,

    To do this you need to configure your “index” page properly.

Post a new comment

top