Locator Upgrade - Magento Steps
Search engines and AI assistants often cannot see your store finder. When they visit the page, your stores are not on it yet: they only appear later, on the visitor's screen. So your stores can be missing from search results and from the answers AI assistants give.
After these steps, every store finder page arrives with its stores already on it, with names, addresses and opening hours. Search engines and AI assistants can find each of your stores and show it. Your visitors see the store finder as usual.
It works for a store finder already on your shop and for a new one. It takes four steps. Some steps depend on how your shop is set up: each of those says how to find out, and what to do in each case.
What you need
Magento Open Source or Adobe Commerce 2.4.3 or later, including Adobe Commerce Cloud. On an older version? Ask Uberall before you start.
A developer who can run bin/magento on your shop and deploy it, and an admin user with access to Stores, Configuration
The Uberall Store Finder module, a zip file: uberall-store-finder-magento-latest.zip
Your render token, from Uberall
Your locator key, from Uberall. If the store finder is already on your shop, it is the data-key of its snippet:
<div id="store-finder-widget" data-key="YOUR_LOCATOR_KEY"></div>
Your store finder's address: the page it is on, such as https://www.example.com/store-locator. Each store gets its own address under it
Step 1: Install the module
Find out how your shop is deployed: if your shop's code is in a repository, such as Git, and goes live from there, or if it runs on Adobe Commerce Cloud, use a). If changes are made on the server itself, use b).
a) Deployed from a repository, or on Adobe Commerce Cloud
Put the zip file, as it is, in a folder of your project, such as artifacts.
Run, from the project's root:
composer config repositories.uberall-store-finder artifact artifacts
composer require 'uberall/module-store-finder:*'
bin/magento module:enable Uberall_StoreFinder
Commit the folder, composer.json, composer.lock and app/etc/config.php, and deploy as usual. Your deployment runs bin/magento setup:upgrade; Adobe Commerce Cloud does it by itself.
b) Changes made on the server
Unzip the file into app/code/Uberall/StoreFinder, so that app/code/Uberall/StoreFinder/registration.php exists.
Run, from the shop's root:
bin/magento module:enable Uberall_StoreFinder
bin/magento setup:upgrade
bin/magento cache:flush
If the shop runs in production mode (bin/magento deploy:mode:show says so), also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy, as after any module install.
Step 2: Add your render token and your store finder's address
In the admin, go to Stores, Configuration, Uberall, Store Finder. Fill in:
- Render token: the token from Uberall. To keep it out of the database, see below.
-
Store finder pages: the address of your store finder page, without the domain, such as
/store-locator.- If your addresses start with a store code, such as
/en/store-locator, leave it out:/store-locator. - If your store finder is on more than one page, list each of them, comma-separated, such as
/store-locator,/fr-fr/nos-magasins.
- If your addresses start with a store code, such as
Click Save Config, then flush the cache in System, Cache Management. The token stays on your server. Visitors never see it.
These settings apply to all store views. If a website or a store view needs other values, a different token for another store finder for example, choose it under Scope at the top left and set its values there.
To keep the token out of the database, leave Render token empty and set it in your shop's environment instead:
CONFIG__DEFAULT__UBERALL_STORE_FINDER__GENERAL__RENDER_TOKEN=your-render-token
On Adobe Commerce Cloud, add it as a variable of the environment, marked sensitive.
Every address under a store finder page belongs to the store finder: Magento shows the store finder page for it, and the store finder shows the store. Do not put other pages under it, such as a CMS page at /store-locator/opening-days: the store finder would show instead.
Step 3: Put the store finder on its page
The module puts your stores into the store finder's div on the page Magento sends. So the div has to be in that page, not added later by a script.
Find out where your snippet is: open your store finder page in the browser, right click, and choose View page source. Do not use the browser's developer tools: they show the page after scripts have changed it. Search the source for store-finder-widget.
a) The store finder is not on your shop yet
Create a page in Content, Pages, with the store finder's address as its URL Key, such as store-locator. Add the store finder snippet to its content: with Page Builder, as an HTML Code element; without it, with Show / Hide Editor. Replace YOUR_LOCATOR_KEY with your locator key:
<div id="store-finder-widget" data-key="YOUR_LOCATOR_KEY"></div>
<script src="https://locator.uberall.com/locator-assets/storeFinderWidget-v2.js"></script>
b) You found store-finder-widget in the source
The snippet is in the page already: in a CMS page or block, a widget, or your theme's templates. All of these work. Leave it where it is, and check its settings, as described in If the store finder is already on your shop.
c) The store finder shows in the browser, but store-finder-widget is not in the source
A script adds it after the page has loaded, for example a tag manager such as Google Tag Manager. The module cannot reach it there. Move the snippet into the page:
- Add it as in a), with the settings it has today.
- Remove it from the tag manager, or wherever the script adds it, so it is not on the page twice.
Either way, keep the div empty, as above: the module puts the stores inside it. If the div has anything inside it, even text, the page is served without them.
The module sends Uberall the div's data-key, data-language, data-countries and data-widgetoriginurl, so the stores in the page always match what the store finder shows.
If your snippet loads storeFinderWidget-v2-withoutMap.js, the store finder shows no map, and its pages arrive without one too. Nothing to add.
If its addresses have #! in them today, check with Uberall that your store finder is set up without it.
A store finder in more than one language
Give each language its own page, with a snippet in that language:
-
a) One store view per language: create a page for each store view, all with the same URL Key, such as
store-locator, and choose the store view under Page in Websites. In each, set the language on the snippet, such asdata-language="de", and setdata-widgetoriginurlto that page's full address, such ashttps://www.example.com/de/store-locator. -
b) One store view, a page for each language: create a page for each language, with its own URL Key, and list each of them under Store finder pages in step 2. Set the language and
data-widgetoriginurlon each page's snippet, as in a).
Ask Uberall to switch on each language for your store finder.
If the store finder is already on your shop
After these steps, your store finder pages use only the settings saved at Uberall. What is set on the page itself no longer applies there:
- attributes on the store finder's
div, other thandata-key,data-language,data-countriesanddata-widgetoriginurl - settings your shop's scripts pass to
UberallStorefinderMountorUberallStorefinderRestart, other thanwithoutMap
To find them, look in two places:
-
The store finder's
div, in the page's source: anydata-attribute other than the four above. -
Your shop's scripts, in the page's source and in your theme's JavaScript files: calls to
UberallStorefinderMountorUberallStorefinderRestart.
If you find any of these settings, send them to Uberall before you go on, to be saved with your store finder. Until then, leave the page as it is: the store finder keeps working as it does today.
Step 4: Check
Open your store finder in the browser, right click, and choose View page source. Search the source for __ubSfSsr. If you find it, it works.
Then open one of your stores and copy its address into a new tab. The store's page should open, with the store's name as the page title.
What changes on your store finder pages
On the store finder's pages, the module replaces part of what Magento puts in the page's head with what Uberall sends for each store:
- the title, the canonical link and the description
- the Open Graph tags, with the
twitter:tags that go with them - the structured data (
application/ld+json)
It only replaces what Uberall sends. What Uberall does not send for a page stays as your shop has it. For example, if no description is set up at Uberall for your store finder's main page, the page keeps the meta description from its CMS page.
If it does not work
| What you see | What to do |
|---|---|
A store's page, such as /store-locator/l/berlin/..., says "Page not found" |
Check the Store finder pages in step 2: the page's address as it is in the browser, without the domain and without a store code. Then flush the cache. |
The source has no no server render line and no __ubSfSsr
|
As above. If that is right, check that bin/magento module:status Uberall_StoreFinder says the module is enabled, and see When changes show. |
The source ends with no server render (no token)
|
Add the token, as in step 2, for the store view you are looking at. |
The source ends with no server render (declined: unauthorised)
|
The token is not the one Uberall gave you. Paste it again. |
The source ends with no server render (declined: unresolvable-path)
|
The store finder's address at Uberall is not this page's. Ask Uberall to correct it. If one store finder is on several pages, set data-widgetoriginurl on each page's snippet to that page's full address. |
The source ends with no server render (no data-key on the store finder div)
|
Add data-key to the snippet, as in step 3. |
The source ends with no server render (request failed)
|
Your server cannot reach Uberall. Ask your host to allow outgoing HTTPS to uberall.com. |
The source has no store-finder-widget at all |
The snippet is added by a script. Move it into the page, as in step 3 c). |
The source ends with another no server render (...), or __ubSfSsr is not there |
Contact Uberall, with that line. |
When the store finder content does not arrive
The store finder keeps working in every case. If the content does not arrive, because your server cannot connect to Uberall, the connection takes too long or it returns an error, the page loads without it, and the store finder appears on the visitor's screen as usual.
When changes show
A change at Uberall, to your stores or to your store finder's settings, takes a few minutes to show on these pages.
Magento's own page cache does not delay it: the module adds the stores after it. A cache in front of Magento could, such as Varnish, Fastly or a CDN. So the module sends store finder pages with Cache-Control: no-store: Varnish and Fastly, as Magento sets them up, do not keep them, and every visit gets the current stores. The rest of your shop is cached as before. A CDN set up to cache pages whatever they say, such as a "cache everything" rule, may keep them anyway: exclude the store finder's addresses, such as /store-locator/*, from it.