Here you can find instructions on how to install and configure the Cartally AI Search widget in your Magento 2 store.Documentation Index
Fetch the complete documentation index at: https://docs.cartally.co/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Step 1 — Add the widget script
Add the Cartally script to your Magento theme so it loads on every page. Option A — CMS Block (recommended)- In the Magento Admin, go to Content → Blocks → Add New Block.
- Set the Block Title and Identifier (e.g.,
cartally_widget). - Switch to the HTML editor and paste:
- Save the block.
- Go to Content → Widgets → Add Widget.
- Choose CMS Static Block as the type and your theme.
- In Layout Updates, set Display on to “All Pages” and Container to “Before Body End”.
- In Widget Options, select the block you created.
- Save and clear the cache (System → Cache Management).
default_head_blocks.xml or footer.phtml:
Step 2 — Create an Integration Access Token
Cartally connects to your store using Magento’s Integration feature, which provides a permanent access token with scoped permissions.- In the Magento Admin, go to System → Integrations.
- Click Add New Integration.
- Set the Name to
Cartally(or any name you prefer). - Go to the API tab.
- Under Resource Access, select Custom and enable only read access to these resources:
- Catalog → Inventory → Products (read)
- Stores → Settings → All Stores (read)
- Stores → Currency (read)
- Click Save and then Activate.
- In the confirmation dialog, click Allow.
- Copy the Access Token — you will paste it in the Cartally panel.
Security: Only read permissions are required. Cartally never modifies your products, orders, or any other data.
Step 3 — Configure settings in the Cartally panel
- Log in to app.cartally.co.
- Go to Integration and enter your store’s URL (e.g.,
https://your-store.com). - Select Magento as the platform.
- Paste the Access Token from Step 2 into the API Key field.
- Click Save & Connect — Cartally will verify the connection and start syncing products.
Step 4 — Customize the widget
Go to Widget in the Cartally panel sidebar to set:- Search bar position and appearance
- Colors, fonts, and language
- Result layout (grid or list)
- Custom CSS overrides
Features
- Magento 2.x REST API — native integration via
/rest/V1/endpoints - Multi-store views — each store view is synced as a separate language
- Multi-currency — all active currencies are indexed for accurate price filtering
- Configurable products — variants are split by color for better search results
- Automatic sync — products are periodically re-synced to keep your search index up to date
Troubleshooting
Connection test fails with 401
Connection test fails with 401
The Access Token is invalid or expired. Go to System → Integrations in Magento Admin, find the Cartally integration, and click Reauthorize. Copy the new token and update it in the Cartally panel.
Products are not syncing
Products are not syncing
Verify that the integration has Catalog → Products read permission. Also check that your products have Status = Enabled and Visibility set to “Catalog”, “Search”, or “Catalog, Search” (products with visibility “Not Visible Individually” are skipped).
Missing translations / only one language syncs
Missing translations / only one language syncs
Ensure you have multiple Store Views configured in Stores → All Stores, each with a different locale. Cartally detects languages from the store view locale settings (e.g.,
en_US, pl_PL).Images are broken or missing
Images are broken or missing
Cartally constructs image URLs using your store’s base URL and the media gallery paths. Make sure your Stores → Configuration → Web → Base URLs are correct and that product images are properly uploaded in the catalog.
