Widget locations
The Photoslurp for Prestashop module allows you to place widgets in any of the following locations of your store:
- Home page
- Category pages
- Product pages
- Lookbook (landing) pages
- Any other location by means of a custom hook in the theme templates.
Based on our customer's results we strongly recommend integrating a carousel widget in the product pages as a bare minimum, and because all of our packages include unlimited widgets we encourage you to be creative and experiment placing widgets throughout all your customer's journey.
Adding widgets in Prestashop
Widget settings
- Active
Enable or disable the widget. - User Name
Here you must enter your username in the Photoslurp platform. - Widget Id
Paste the widget ID you copied before from the Widget Editor in this field. - Page Type
The location where you would like to display the widget. You can choose one of the following options:- Home page
- Product page
- Category page
- Lookbook page
- Product Hook
* only available in product page location- Displays the widget in the selected product page hook (its position).
-
* only available in category page location
- Choose whether you want to display this widget in all category pages or just in a subset of categories. When "Only in selected categories" is selected a field named "Categories" will appear to let you select the categories in which you want to display the widget.
- Only Show Media From Product Category
When this setting is enabled the images shown in the widget will be filtered as follows:- For "Home page" and "Lookbook" locations a new field "Categories" will appear. You can select from which product categories you want to display content in the widget.
- For "Category page" and "Product page" locations the widget will show images with products from to the same category as the product/s in the page being displayed.
Displaying a widget in the Home Page
To display a widget on the Home Page of your store create a new widget and choose "Home page" as the Page Type.
The widget position can be modified in Prestashop's built-in hook positions list by reordering the hook "displayHome".
Displaying a widget in a Lookbook (CMS) page
To add a *Lookbook* widget to a CMS page, first create a widget with the "Lookbook" page type, then place the following code into CMS template file located at *themes/name_of_your_site_theme/cms.tpl* in Prestashop 1.6:
{if $cms->id eq 6}
{hook h='psWidget' id_pswidget='1'}
{/if}
Or place the code below inside the file *themes/name_of_your_site_theme/templates/cms/page.tpl* in Prestashop 1.7:
{if $cms.id eq 6}
{hook h='psWidget' id_pswidget='1'}
{/if}
The id value on the first line refers to the ID of the CMS page where you would like the widget to be displayed:
And id_pswidget on the second line is the ID number of the widget instance to display, which can be found on the Photoslurp module settings page: