Platform guide8 min read

PrestaShop store locator: why the CMS editor is the wrong place, and what works

How to add a hosted store locator to PrestaShop 8, why the CMS page editor removes the script, and the module or theme routes that keep PrestaShop's HTML protection switched on.

In short

PrestaShop protects its HTML fields: the Use HTMLPurifier Library setting cleans what is saved into them, and PrestaShop's documentation says to disable it only if you know very well what you are doing. That protection is why a script pasted into a CMS page does not survive.

So do not paste the locator into the CMS editor, and do not switch HTMLPurifier off to make it fit. Put the embed in a theme template or a module that outputs raw HTML on one page, which keeps the protection on everywhere else.

PrestaShop also ships its own Stores page listing your shop addresses. A hosted locator replaces that for networks that need search, filters and many locations.

The built-in Stores page, and when it is enough

PrestaShop has a stores list under Shop Parameters, shown on a front-office Stores page. For a few shops of your own, that is often all you need, and it costs nothing.

It runs out when the list is long, when the locations are not your shops (stockists, dealers, salons that carry your product), when visitors need to filter by product or service, or when the people who maintain the list should not be in the PrestaShop back office.

Why the CMS editor removes the embed

PrestaShop 8's General settings include two options that matter here. Allow iframes on HTML fields lets iframes into text fields, and PrestaShop recommends leaving it disabled unless necessary. Use HTMLPurifier Library guarantees that data sent into those fields is safe, and the documentation says to disable it only if you know very well what you are doing.

A locator embed is a script tag, which is exactly what that cleaning exists to stop. Turning the protection off for the whole shop to place one widget trades a store finder for a real security exposure on every product description and customer field. Do not do it.

Two routes that keep the protection on

Either way, the snippet never passes through the HTMLPurifier-cleaned fields, and every other text field in the shop stays protected. Of the two, the theme template is the cleaner choice if you already have a developer; the module is the one a merchant can do alone.

RouteWho does itHow
A theme templateWhoever maintains your themeAdd the two-line embed to the template of one CMS page (or a new page template), so it is part of the theme rather than saved content
A custom HTML moduleAnyone who can install modulesUse a module from PrestaShop Addons that outputs raw HTML into a hook, and restrict it to the locations page

Add the locator with a theme template

This is a short job for whoever maintains your theme, and it survives PrestaShop updates if it lives in a child theme.

  1. Import your locations and style the widget in the locator dashboard, then copy the snippet from Embed & Install.
  2. Create a CMS page for it under Design, then Pages, with a short intro paragraph and a friendly URL such as stores.
  3. In your child theme, add the snippet to the template that renders that page, wrapped in a check for the page's id so it appears there only.
  4. Clear the PrestaShop cache under Advanced Parameters, then Performance.
  5. Open the page on the front office and run the checks below.

Checks before you call it done

On the front office, logged out.

  • Open the published page in a private window, not the editor. Most builders do not run third-party scripts while you edit.
  • Search your busiest town and a town you do not serve, and read both results.
  • Open it at phone width and use it one-handed.
  • Tap a phone link and a directions link on a real phone.
  • Run Check installation in the Handled dashboard against the public URL. Setup completes when the locator has loaded on that page.

Where Handled Locator fits on PrestaShop

On PrestaShop, Handled Locator is the embed described above: two lines in a theme template or a raw-HTML module, with HTMLPurifier left switched on. Locations come from CSV, the dashboard, or a sync from Google Sheets, Airtable, Webflow CMS or HubSpot. The map runs on your own Mapbox or Google Maps key, billed by the provider with nothing added. Plans are $19, $39 and $79 a month for 200, 2,000 and 10,000 locations, after a 7-day trial with no card. You can also run it from ChatGPT or Claude: add locations, restyle the widget and get the embed code by describing what you want, with every design change shown before it goes live.

It does not read PrestaShop's own stores list or its stock. If you keep shop addresses in PrestaShop today, export them to CSV and import that into the locator once.

Sources

PrestaShop 8 user guide, General parameters. Read on 15 November 2026.

Frequently asked questions

Why does PrestaShop remove my script tag?

HTML fields are cleaned by the HTMLPurifier setting, which PrestaShop recommends leaving on. Put the embed in a theme template or a raw-HTML module instead of the CMS editor.

Should I disable HTMLPurifier to add a widget?

No. It protects every text field in the shop. A theme template or a module places the widget on one page without switching protection off.

Does PrestaShop have a store locator built in?

It has a Stores page listing your shop addresses. A hosted locator adds search, filters, many locations and non-shop locations such as stockists.