Skip to main content

PrestaShop installation

PrestaShop Testimonials Through a Child Theme

PrestaShop’s back office text fields reject script tags, and its HTML cleaner is meant to stay on. So the StoryProof embed does not belong in a Custom text block. It belongs in a child theme: the script registered as a remote asset, the widget div added by extending one template.

  • A child theme.yml with the script as a remote asset
  • A homepage template override with the widget div
  • Why the Custom text block is the wrong place

Code generator

Child theme files with your widget id

Enter the widget id. Part 1 is the child theme’s config file, which loads the script on every page. Part 2 overrides the homepage template to add the widget div below the existing homepage content.

Shown in StoryProof when you copy a widget’s embed code.

Part 1 · Child theme config with the script as a remote asset

themes/mychild/config/theme.yml

# themes/mychild/config/theme.yml
parent: classic
name: mychild
display_name: Classic with StoryProof
version: 1.0.0
assets:
  use_parent_assets: true
  js:
    all:
      - id: storyproof-embed
        path: https://app.storyproof.io/embed.js
        server: remote
        position: bottom
        attributes: async
        priority: 200

Part 2 · Homepage template override with the widget div

themes/mychild/templates/index.tpl

{* themes/mychild/templates/index.tpl : the homepage *}
{extends file='parent:index.tpl'}

{block name='page_content' append}
  <section class="storyproof-testimonials">
    <div data-storyproof-widget="YOUR_WIDGET_ID"></div>
  </section>
{/block}

Copy preview.png from the parent theme into the child folder, activate the child theme in the back office, and load the homepage in a private window.

Generated in your browser. Nothing you type is sent.

The problem, solved

Why PrestaShop refuses the snippet, and the theme route that works

  • Problem 1

    The Custom text block will not save

    PrestaShop validates back office HTML and rejects anything containing a script tag, so the save fails or the field is flagged as invalid.

  • Problem 2

    Forum posts say disable HTMLPurifier

    PrestaShop’s own docs say that option keeps data sent to your shop safe and should only be turned off if you know very well what you are doing.

  • Problem 3

    Widgets wanted on several templates

    A script added per template would load twice on any page that includes two of them.

  • Problem 4

    A testimonial module to moderate as well

    Module based testimonials add another approval queue inside the back office, next to orders and returns.

  • Problem 5

    Getting buyers to leave one

    Without an automatic trigger, asking for testimonials depends on someone remembering.

In StoryProof

Install it with a child theme

Step 1 of 4

Create the child theme folder

In themes, create a folder such as mychild containing config/theme.yml and preview.png. PrestaShop’s docs recommend copying both from the parent theme.

Ways to get the embed into PrestaShop

RouteWorks?Why
Custom text block or CMS page contentNoBack office HTML validation refuses script tags
Turn off HTMLPurifier and retryNot advisedPrestaShop warns against disabling it
Child theme: theme.yml plus template overrideYesScript and div never pass through an HTML field
Link to the hosted Wall of LoveYes, no codeVisitors leave the shop to read testimonials

Before you start

PrestaShop caveats

  • Needs file access

    There is no back office only route for the script. If you cannot edit theme files, ask your developer or link to the Wall of Love instead.

  • Block names depend on the theme

    Part 2 uses the page_content block from the Classic homepage template. Third-party themes may name their blocks differently; check the parent template first.

  • Check the attribute key

    PrestaShop’s asset docs are inconsistent between attribute and attributes in their examples. If async is missing from the rendered tag, try the other spelling.

  • Not your product reviews

    The widget shows testimonials approved in StoryProof, not PrestaShop’s product comments. Widgets show a "Powered by StoryProof" badge until Pro.

  • PrestaShop docs as of 2026-11-13

    File layout and options follow PrestaShop’s developer and user documentation, and the Classic theme source, as read on 2026-11-13. Nobody has followed these steps on a live shop yet.

FAQ

Questions people ask

Short answers to what usually comes up next.

Will a theme update wipe the change?

That is the reason for a child theme. Your files live in their own folder and extend the parent, so updating the parent theme does not overwrite them.

Can I show testimonials on product pages too?

Yes. Override the product template in the child theme the same way and add a div with a different widget id. Our blog covers which page types benefit most.

Why not just allow iframes and use an iframe?

The StoryProof embed is a div and a script, not an iframe. The iframe setting would not help, and PrestaShop recommends leaving it off unless you need it.

Do I need a PrestaShop module at all?

No. StoryProof is embed code. Nothing is installed in the back office, and no database tables are added.

Still have a question? Ask the StoryProof team or book a demo.

Add buyer testimonials to your PrestaShop store

Collect and approve them in StoryProof, then ship two small child theme files.

Sources

  1. Asset management, PrestaShop Developer Documentation. Checked 2026-11-13.
  2. Parent/child feature, PrestaShop Developer Documentation. Checked 2026-11-13.
  3. General parameters, PrestaShop User Documentation. Checked 2026-11-13.
  4. Validate::isCleanHtml (classes/Validate.php, 8.2.x), PrestaShop on GitHub. Checked 2026-11-13.
  5. ps_customtext classes/CustomText.php (text field validated with isCleanHtml), PrestaShop on GitHub. Checked 2026-11-13.
  6. Classic theme templates/index.tpl, PrestaShop on GitHub. Checked 2026-11-13.

Last updated 2026-11-13.