Install Benson on PrestaShop
Add the Benson snippet to your PrestaShop theme's head template (a child theme keeps it safe from updates), clear the cache, and check it's live.
Jump to a section
PrestaShop has no box for head scripts in the back office, so add Benson to your theme's head template. Use a child theme to prevent a theme update from removing it. Choose Other as your platform in the setup wizard.
Your snippet#
Your real snippet, with your site key, is in the setup wizard and under Settings → Install:
<script async src="https://cdn.trybenson.com/benson.js" data-site="pk_live_YOUR_SITE_KEY"></script>Add it to PrestaShop#
- If you don't have one, make a child theme of the theme you use: a folder in
themes/with aconfig/theme.ymlthat names your theme asparent, and apreview.png. - Copy
templates/_partials/head.tplfrom your theme into the same place in the child theme, and paste your snippet at the end of the file. - Turn on the child theme with Use this theme under Design → Theme & Logo.
- Go to Advanced Parameters → Performance and click Clear cache.
If you use PrestaShop 1.7 or 8 with the Classic theme, the head template ends in an empty {block name='hook_extra'}{/block}. Paste the snippet inside it.
Check it's live#
Open your store in a normal browser tab. The setup wizard shows Verified: Benson is live within a few seconds. If it doesn't, see Troubleshooting.
Good to know#
PrestaShop's checkout uses the same head template as the rest of the store, so the snippet reaches checkout. Benson hides extension pop-ups and guards the coupon field there.
Stuck? Email [email protected].
