Widget locations
The Photoslurp module for Prestashop allows you to display widgets in any of the following locations:
- Home page
- Category pages
- Product pages
- Lookbook (landing) pages
- Any other location by means of a custom hook in the theme templates.
Based on customer feedback, we recommend always inserting at least a carousel widget in product pages. Since all of our packages include unlimited widgets, we encourage you to be creative and experiment with widget placement throughout your customer’s journey.
Adding widgets in Prestashop
Once you have configured a widget in the Widget Editor, copy the widget ID by clicking on the copy icon next to it.
Back in your Prestashop back-office, scroll down to the “Widgets” section of the Photoslurp module and click on the "ADD NEW WIDGET" button as shown in the screenshot below:Widget settings
The available options may vary depending on the "Page type" (location) selected for the widget:
- Active
Enable or disable the widget. - User Name
Here you must enter your username in the Photoslurp platform. - Widget Id
Paste here the widget ID you copied before in the Widget Editor. - Page Type
The page 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 pages.- Choose the position on the page (hook) where the widget will be displayed.
-
* only available in category pages.
- Allows you to select whether the widget should be displayed on all category pages of your store or only on a subset of pages. When "Only in selected categories" is selected, a list 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 the "Home" and "Lookbook" pages, a new "Categories" list field will appear, where you can select the product categories you want the widget to display content from.
-
For the "Category" and "Product" pages, the widget will only display images that are assigned to products of the same category as the product/s in the page being viewed.
-
Displaying a widget in the Home Page
To display a widget on the Homepage 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:
The id_pswidget value on the second line is the ID number of the widget instance to display, which can be found on the Photoslurp module settings page: