To integrate widgets in the desired pages of your store (homepage, product page or category pages) it is necessary create them in the Photoslurp widget editor.
Once you have published the widgets, add a new "widget" line to the "blocks" section of the corresponding template file. These files can be found in your workspace directories:
- Homepage: "store > blocks > home > home.jsonc".
- Product pages: "store > blocks > pdp > product.jsonc".
- Category pages: "store > blocks > search.jsonc".
Each new block added to a page file will be displayed in the sidebar of the site's visual editor, located within the VTEX administration panel.
"Store setup -> CMS -> Site Editor"
Note: To move the element up or down in your layout, please change the order of the blocks in its corresponding template file.
Clicking on the block name will unfold the widget configuration options, where you must enter the Widget ID of the Photoslurp widget to display on the page.
The "Enable Product Types" setting has no use for homepage widgets (this page is not associated with any specific category, so the widget can't apply the category filter) but can be enabled for widgets on product pages and category pages:
- On category pages, enable it so that the widget displays images and videos that have been linked to products in the category being viewed.
- On product pages, enable it and disable the "Strict products" filter for this widget (in the Photoslurp widget editor) to include images and videos linked to other products in the same category as the product being viewed.