DataFirefly Google Shopping — Complete guide
Installation, feeds per country / language / currency, Google categories, rules, overrides, issues, optional Merchant API and AI suggestions, cron and troubleshooting of the Google Shopping module for PrestaShop 1.7.8, 8 and 9.
Overview
DataFirefly Google Shopping generates your Google Merchant Center feeds from PrestaShop: products, local inventory and promotions, one feed per shop, country, language and currency. It checks every item against the Google product data specification, shows what it found and lets you correct it with categories, rules and overrides before Google reads the feed. The Merchant API and AI suggestions are optional.
The module adds a Google Shopping menu under Improve with 10 pages: Dashboard, Feeds, Google categories, Rules, Products, Issues, AI suggestions, Insights, Import / export and Settings. It creates 18 tables prefixed dfgs_, does not override any PrestaShop class and does not modify any core file.
The module follows the Google specification, but Google alone decides on the approval and the display of your products. The quality indicator of the dashboard is an internal completeness check, not a Google score.
Requirements
- PrestaShop 1.7.8, 8.x or 9.x.
- PHP 7.4 to 8.5 with the
xmlwriterandzlibextensions (opensslandcurlfor the Merchant API and AI). - A Google Merchant Center account.
Installation
- In the back office, open Modules → Module Manager and click Upload a module.
- Select
dfexportgoogleshopping-2.0.0.zip. PrestaShop installs the module. - Open Improve → Google Shopping. The setup assistant starts on the first visit.
Upgrading from version 1.x
Upload the 2.0.0 zip over the installed module (same procedure as the installation). The upgrade:
- keeps your feeds, their public URL, their token and the item IDs of version 1.x, so Merchant Center keeps your products;
- carries over category mappings, product overrides and settings;
- encrypts the API keys stored by version 1.x;
- leaves the Merchant API sync off until you configure it (the Content API for Shopping used by 1.x has been shut down by Google);
- removes the old files of 1.x, including the
feeds/folder.
Version 2.0.0 only produces Google feeds. If a 1.x feed was set to Bing, Meta, Kelkoo, Idealo or LeGuide, its URL now serves the Google format: check it before keeping it in that channel.
After the upgrade, open the Dashboard: the feeds are generated again at the first cron run or when you click Generate.
Setup assistant
Four steps: countries, language and currency, shipping, then the Google categories of your main categories. The assistant creates one feed per country you selected. Everything can be changed later in Feeds and Google categories.
Feeds
In Feeds, each card shows the country, language, currency, the items sent and excluded, the quality indicator and the feed URL (masked; Copy URL copies it). Actions: Generate, Preview, History, Settings, Disable, Duplicate.
The feed settings have five tabs:
- Target: feed type (products, local inventory, promotions), name, shop, target country, language, currency, prices (automatic: without tax for the United States and Canada, with VAT elsewhere), item ID format, destinations and excluded destinations. Keep the item ID format of an existing feed: changing it makes Merchant Center see new products.
- Products: only or except some categories and brands, minimum and maximum price, excluded product IDs, out-of-stock products.
- Titles and texts: title pattern with tokens
{name},{brand},{attributes},{color},{size},{material},{category},{reference},{feature:Name}and a live preview on the products of the feed; combination values in the title; removal of promotional words and emphasis capitals; source of the description, highlights from the bullet lists of the description, product details from the features, brand used when a product has none. - Shipping: none, a flat price with a free-shipping threshold, or a PrestaShop carrier; optional service name and delivery times.
- Advanced: image size sent, tracking parameters added to the links, and Change the public URL.
Declaring the feed in Merchant Center
- Click Copy URL on the feed card.
- In Merchant Center, add a product source from a file with a scheduled fetch, and paste the URL.
- Choose the same country and language as the feed.
The URL contains a 40-character token. If it has leaked, use Change the public URL in the Advanced tab: the old URL stops working at once and must be replaced in Merchant Center. Feed files are stored in var/dfgs_feeds/ under a name that cannot be guessed and are only served through this URL, on Apache as on nginx.
Item preview
Preview on a feed computes, for the product you choose, what this feed would send now: a Shopping-style card, the price and sale price, the issues found and every attribute. Use it to check a product before or after a change.
Generation, history and cron
Generation runs in batches. If it is interrupted, the next run resumes where it stopped; a lock prevents two runs of the same feed at the same time. At the end, the module checks that the XML is well formed, writes a gzip copy and compares the items with the previous generation.
History lists the last 30 generations (trigger, items sent and excluded, indicator, differences, time, memory, size, XML check) and the field-by-field differences of an item.
To regenerate the feeds automatically, call the cron URL shown in Settings (for example every hour); Regenerate each feed at most every sets how often a feed is due (1 to 24 hours). Each call generates the feeds that are due, within about 25 seconds, and resumes at the next call if needed; when the Merchant API is enabled, it also sends the queued product changes.
0 * * * * curl -s "https://www.example.com/index.php?fc=module&module=dfexportgoogleshopping&controller=cron&token=YOUR_CRON_TOKEN" > /dev/null
Google categories
The Google product taxonomy (version 2021-09-21) is included in 8 languages: the search runs locally, with no call to Google. For each shop category, type a few words and choose the Google category. A subcategory inherits the choice of its parent until you set its own. For apparel, set the gender and the age group: they are required in several countries.
Rules
A rule has conditions (category, brand, price, quantity, title, reference, condition, GTIN present, Google category present, on sale, availability) and an action: exclude the item, set a custom label 0 to 4, add a prefix or a suffix to the title, replace or remove words. Rules run from top to bottom at every generation, for all feeds or one feed. Preview shows the matching items before and after the rule.
Products and overrides
Products lists your products with the title sent, GTIN, brand, MPN, condition, Google category and status. Double-click a cell to edit it; select products to apply an action in bulk (exclude from Google, include, condition, gender, age group, brand, Google category, custom label, remove the overrides).
Details opens the overrides of one product, for the whole product or one combination, and for each language: title, description, highlights, color, size, material, product type, GTIN, MPN, brand, Google category, custom labels. On the right, the preview shows what Google will receive. Overrides only change the feed, never your catalogue. A GTIN is refused if its length, check digit or prefix is not valid.
Issues
Issues lists what the module detected at the last generation, by type (excluded, warning, information), with what to do and the items concerned. The GTIN audit checks every GTIN of the catalogue. When the Merchant API is enabled, the issues reported by Google appear in their own section.
Merchant API (optional)
- In Google Cloud, create a project, enable the Merchant API and create a service account with a JSON key.
- In Merchant Center, add the e-mail of the service account as a user.
- In Settings → Merchant API, enter your Merchant Center account ID and the JSON key (stored encrypted, never displayed again), then click Test the connection, Register the project (once) and Create the API data source.
- Enable Send product changes through the Merchant API (with the cron).
Saving a product only adds it to a queue; the cron sends the queue and reads the item statuses. Quota errors are retried later with an increasing delay.
AI suggestions (optional)
In Settings → AI, choose the provider (Anthropic, OpenAI or Mistral), enter your API key (stored encrypted), the model and a monthly cap. In AI suggestions, choose titles, Google categories or attributes, the products and the language: the cost is estimated before the run.
Each suggestion goes to Waiting for validation with the current value and the suggested value, which you can edit before clicking Apply. Nothing is applied without your click. AI titles are sent as AI-generated content as Google asks. The AI is never asked for a GTIN.
Insights
- Title tests: two titles alternate by period for one product. Enter the impressions and clicks from your Merchant Center or Google Ads reports. A result is only called significant with at least 1,000 impressions per title, 30 clicks in total and p < 0.05; even then, other factors (season, competition, bids) may explain the difference.
- Search queries: import the CSV of your Search Console queries; the module matches each query with a product and shows the queries whose words are missing from the title.
- Seasonality: products whose past sales concentrate on the next two months, which you can tag with a custom label.
- Image audit: product images that are too small (under 100 or 500 pixels on the short side), too elongated or heavier than 16 MB.
Alerts
In Settings → Alerts, enter an e-mail address and/or a Slack webhook and choose the events: generation failed, drop of the quality indicator, new issues reported by Google.
Import / export
Export and import the overrides as CSV (semicolon, UTF-8). Cells starting with =, +, - or @ are neutralised in the export. This page also holds the store list of the local inventory feed and the promotions of the promotions feed.
Structured data (JSON-LD)
Off by default. In Settings, Structured data on product pages in automatic mode adds a Product block to the product page only when the page has none (theme, SEO or reviews module), with the price shown on the page. If your theme already outputs one, leave it off.
Other DataFirefly modules
When they are installed, the feed takes into account: the gift wrap product (never sent), products blocked by an auction, expired best-before lots, the refurbished condition and grade, the unit price and the product groups of the product linker (item_group_id).
Multistore and permissions
Each feed belongs to one shop and only sees its products and overrides; in a shop context, the feeds of other shops cannot be opened. Write actions require the edit permission on the page: an employee with view permission only can look but not change anything.
Troubleshooting
- The feed is empty: check the categories and filters of the feed, and that the products are enabled, visible and available for order in the shop of the feed. The Issues page gives the reason of every exclusion.
- The URL returns 404: the feed is disabled, the token was renewed, or the module is disabled.
- Prices differ from the shop: check the country and currency of the feed and the tax option in Advanced; Google expects prices excluding tax for the United States and Canada.
- Merchant API: authentication error: check that the service account is a user of the Merchant Center account and that the project is registered.
- AI: nothing happens: check the key, the model and the monthly cap in Settings → AI; the log shows the cause of each failed call.
Uninstallation
Uninstalling removes the 18 dfgs_ tables, the DFGS_ settings, the admin pages and the generated feed files. Export your overrides first if you want to keep them.