Diese Anleitung ist noch nicht übersetzt und wird deshalb auf Englisch angezeigt.
Grounded for PrestaShop
The module does two things: it puts your assistant on every page of your shop, and it tells Grounded when you add, change or delete a product or a CMS page, so the assistant answers from what the shop says now and not from what it said at the last scheduled run.
It supports PrestaShop 1.7.6 and every release since, up to 9.x, on PHP 5.6 or later: the range shops actually run, from the oldest of them to the newest. It has no dependencies. Auto-sync, which this builds on, is part of Pro and Business.
The assistant answers from your published pages, not from your catalogue database: it reads a product the way a customer sees it. Prices and stock are only as current as the page.
What you need first
- A bot with your shop as a source. On the bot's Documents page add your sitemap (see below) with Keep in sync ticked.
- The bot key, on the bot's Install page. Add your shop there under Allowed domains, or the widget will not answer.
- The webhook address and secret, on the sitemap source's card under Webhook. Press Create secret and copy it; it is shown once. See Webhooks.
Install
Download the module. In the back office go to Modules → Module Manager → Upload a module, choose the zip and install it. Then press Configure.
| Field | What to put there |
|---|---|
| Bot key | pk_…, from the bot's Install page. Empty means no widget is shown. |
| Side | Which corner the launcher sits in. |
| Report products | Tell Grounded when a product is added, changed or deleted. |
| Report CMS pages | The same for CMS pages. |
| Webhook address | https://…/api/sources/…/hook, from the source's card. |
| Webhook secret | whsec_…. Stored in your shop and never printed on a page. Leave the field empty later to keep the stored one. |
The Grounded address only changes if you host Grounded yourself. It is where the widget's script
is loaded from, on every page, so only a super administrator can change it. The webhook address must
be https.
If you change the webhook address later, enter the secret again with it: the stored secret is only used for the address it was saved with, so an address typed by someone else cannot be used to read it out.
Press Send test ping. It names your home page and shows what Grounded answered: HTTP 202 and a
short summary mean the address and secret are right.
Point the bot at your sitemap
PrestaShop does not publish a sitemap by itself: use the Google sitemap module (gsitemap),
which comes with PrestaShop, or any sitemap module you already have. Generate the sitemap, then on
the bot's Documents page choose Add documents → Sitemap, paste its address (usually
https://your-shop.com/…/sitemap.xml as shown on the module's page), press Preview and keep
Keep in sync ticked.
It lists products, categories, CMS pages and often more. Categories and brand pages hold links and no text of their own: if Preview shows many of them, use Only paths starting with and Skip paths starting with to leave them out. Regenerate the sitemap when you add products: a page that is not in it is not read at the scheduled runs, though a ping names it directly.
The sitemap is what Grounded reads at its scheduled runs (every day on Pro, every hour on Business). The module is what makes a change show up in minutes.
What happens when you save
For a product, the module names its address in every active language of the shop; for a CMS page, the same. Everything one request changes goes out as one call after the page has been handled: an import that touches twenty products is one ping. The call waits half a second at most, so saving in the back office takes as long as it did before, and if Grounded cannot be reached the save still succeeds. The price of that is that a failed ping is lost and nothing in the back office says so; the scheduled run picks the change up later, and Send test ping is how you check the setup.
Grounded reads the named pages from your public shop, not from the ping, so a product that is
disabled or not visible (a 404 for the customer) is removed from the bot, not read.
More than a hundred addresses in one request is a request to read the whole source. Grounded accepts at most 30 calls a minute per source, and about two minutes of crawling a minute across a bot's sources; a large import is covered by the scheduled runs.
What the module does not see: a price or a stock level changed straight in the database, by a stock sync or an ERP connector that does not go through PrestaShop's own product save. Those are read at the next scheduled run.
Troubleshooting
- Send test ping says
401— the secret is wrong or was replaced. Create a new one on the source's card and paste it here. - It says
403or409— the message names the reason: the plan has no auto-sync, or the source is paused, or the bot is switched off. - The ping works and the bot still answers from the old page — a full-page cache or a CDN serving Grounded the old HTML. Purge the product's page when it changes.
- Pages come back empty or
403— a firewall or a CDN's bot challenge is stoppingGroundedBot. Allow that user agent. - A shop in maintenance mode, behind a login or on
localhost— Grounded reads your shop from the internet, so it cannot read these, though the module will still send the ping. - The widget does not show — check the bot key, that your shop is under Allowed domains, and
that your theme prints the footer hook (
displayFooter).
Developing against a local Grounded
The webhook address must be https on the standard port and must not point at the machine the shop
runs on or at a private network address: an address typed in the back office must not be a way to make
your server call something inside its own network. To point it at a Grounded on localhost or on your
network anyway, add this to config/defines_custom.inc.php, which only someone with access to the
files can do:
define( 'GROUNDED_ALLOW_INTERNAL_HOOK', true );
Remove it
Uninstall the module and the widget and the pings stop, and the settings it stored are deleted. Your products and pages are not touched.