Embedding widgets on PrestaShop can sometimes be tedious, but we made it easy for you. A non-technical person can do it. It is fairly easy.
Follow these steps to localize the product page template and copy & paste our widget code at the right placement.
1. Create a widget, and get its embed code
Make sure the widget is for Product Pages. They have a blue-ish colour on the widget manager page.
2. Go to your PrestaShop back office
Make sure you have the admin rights to edit your site.
3. Go to Customise > Appearance > Themes
Tip: note the name of the active theme.
4. Locate the product page template file
Template files are generally located in the /themes/theme_name/templates/catalog/ directory. Often named "product.tpl".
5. Modify the product.tpl file
Open the product.tpl file in a text editor or IDE, and insert the widget code where you want it to appear.
6. Save the changes, and clear the cache
Once you have modified the product.tpl file, go to Back-office > Advanced settings > Performance > Click on ‘Empty cache’.
7. Test it
To test your widget in real time, you need to segment a page. We suggest segmenting with "URL contains ?test".
Then, save your changes > open a product page > add "?test" at the end of its URL > you should see your widget showing.
If your widget is still not showing, feel free to contact us!
We hope this tutorial helped you! 🙂
Do not hesitate to reach out on the chat if you have any question. We're always here to help.