Skip to content
OpenCart · User manual

Google Marketing Tools

Version 13.25.0 Product page
Chapter 10

Product feeds

The Feeds tab creates product feeds for Google Merchant Center and other channels. This chapter covers creating a feed, its common settings, filters, feed URLs and scheduled generation.

How feeds work

A feed is a saved profile. Each profile has a type (the channel), a language, a currency, a store, a destination for the file and a set of filters that decide which products go in. You can create as many profiles as you need, for example one per country or per channel.

A feed is generated when its address is opened or when a scheduled task runs it. The file is XML, CSV, JSON or JSONL depending on the channel. You do not choose the format: the feed type decides it.

Creating a feed

  1. Under Manage feeds - Load or create feed configuration, press Click to create new feed. To edit a saved feed, choose it in Load feed configuration instead.
  2. Choose the Feed file destination and the Select feed type. The form then shows the sections that apply to that channel.
  3. Fill in the general configuration, the channel settings and the filters described below.
  4. Type a Feed name and press Save feed.
  5. Open Feed URLs and CRON jobs to get the address of the feed and give it to the channel.

Delete feed removes the loaded profile.

File configuration

Feed file destination decides where the generated file goes.

OptionWhen to use it
Download from my web browser (Recommended for Small to Medium stores)The feed is generated each time its address is opened and is returned directly. Nothing is stored. Not compatible with scheduled tasks.
Save to my server (recommended for large stores)The file is written to a folder of your shop. A scheduled task regenerates it, and the channel downloads the stored file, which is fast and does not load your server on every request.
Save to an external serverThe file is uploaded to another server by FTP.

Settings for Save to my server:

SettingWhat it does
File pathFolder where the file is saved. Press IMPORTANT: Click to read next to the field to see the root path of your shop and examples. The folder is created if it does not exist, so your server must allow writing there.
File nameName of the file without extension. Type products, not products.xml.
File suffixNo suffix replaces the same file on every generation. This is what a channel needs, because the address never changes. Export Date and Export Date and time add the date to the name and keep a new file each time.

Settings for Save to an external server: FTP - Host, FTP - Username, FTP - Password, FTP - Port (21 by default), FTP - Path to file (for example /httpdocs/myfiles/), FTP - File name (without extension) and Passive mode. Enable Passive mode if the upload fails with an error that mentions "Opening data channel".

General products feed configuration

SettingWhat it does
LanguageLanguage of names, descriptions and links. If you select several languages, one file per language is generated, and the destination must be your server or an external server.
CurrencyCurrency of the prices.
Customer group specialsCustomer group whose special prices are used as sale prices.
Customer group discountsCustomer group whose quantity discounts are used.
Quantity-one discount as base priceFor this feed only, uses the active discount with quantity exactly 1 of the selected discount customer group as the main price. If none matches, the normal price is kept. Specials remain separate sale prices. Disabled by default. Enable it if you keep your real selling price in a quantity-one discount.
StoreStore whose products and domain the feed uses. Product links and direct purchase links use the domain of this store.
Product IDValue used as the product identifier in the feed: Product ID, Model, SKU, UPC, EAN, JAN, ISBN or MPN. It must be the same identifier your tracking sends. See the product identifiers in General settings.
Product thumb width and Product thumb heightSize of the product images in pixels. Default: 600 by 600.
Price with taxIncludes tax in the prices.
Tax to applyTax used when prices include tax. Default uses the tax class of each product.
Show products out of stockIncludes products with quantity 0.
Direct purchase link (checkout_link_template)Adds to each product a link that puts the product in the cart and starts the checkout.

Sizes, colours and quantity discounts as separate items

"Size/Color" compatibility creates one feed item per option value or per combination of size and colour, as fashion channels expect. Select the options that hold sizes and colours in Get size from and Get color from. A shirt with sizes S and M and colours Red and Black becomes four items, with IDs such as 123-S-Red. The price and quantity come from the option value. Product name mask sets the name of each item, for example {product_name} - {color}, {size}.

Discounts like new products creates one extra item for each quantity discount of a product. A shirt with discounts for 2, 5 and 10 units produces three items. Its Product name mask accepts {product_name} and {discount_number}, for example {product_name} (x{discount_number}).

The settings of each channel are described in Feed channels and taxonomy.

Quick product filters

Without filters, a feed contains every enabled product of the store.

SettingWhat it does
CategoriesOnly products in the selected categories. Nothing selected means all categories.
ManufacturersOnly products of the selected manufacturers. Nothing selected means all.
Minimum base price and Maximum base pricePrice range before currency conversion.
Minimum stock quantity and Maximum stock quantityStock range.
Require main imageLeaves out products without a main image.
Require GTINOnly products with an EAN, UPC, JAN, ISBN or MPN.
Added within the last X daysOnly recent products. Blank or 0 means no date limit.
Exclude productsProducts listed here never appear in the feed.
Top sales and Top sales limitOnly the best-selling products, up to the limit, while keeping the other filters.
Latest news and Latest news limitOnly the newest products by available date, up to the limit.

Advanced product filters

Press Click to add new filter to add a rule. Each rule has a Field of the product, a Condition and a Value. The conditions depend on the type of field:

  • text: Contain, NOT contain, Starts with, Ends with, Is exactly, Is NOT exactly, Any of (comma-separated), None of (comma-separated), Is empty, Is not empty;
  • numbers: comparisons (≥, ≤, >, <, =, ≠), Between (two comma-separated values), Outside range (two comma-separated values), any of, none of, empty or not empty;
  • dates: the same comparisons plus Last X days, Last X Months, Last X hours, Last X minutes, Last Х years and Older than X days;
  • yes or no fields: Is YES or Is NOT.

Set main conditional to your filters decides how the rules combine: AND keeps products that meet all rules, OR keeps products that meet any rule.

Feed tools

A row of buttons works on the loaded profile. Save the feed first.

ButtonWhat it does
PreviewShows the first 20 items exactly as they will appear in the final feed. It writes no file and uploads nothing.
Simulate filtersCounts the products that match the current filters and shows the first 10.
Generation historyLists the latest generations with date, status, number of items, duration, size and message. The 100 most recent runs of each feed are kept.
Duplicate hereCreates an independent copy of the profile.
Export profileDownloads the profile as a JSON file. FTP passwords are not included.
Import profileCreates a profile from an exported file.

Feed URLs and CRON jobs

Press HERE in the note at the top of the tab. The window lists every saved feed with its number and name and gives two values.

Direct URL

The address that generates the feed. Use Copy to clipboard or Open URL now. It looks like this on OpenCart 1.5 to 3:

https://example.com/index.php?route=extension/module/google_all_feed&feed_id=12&language=en-gb&currency=EUR

On OpenCart 4 the route is extension/devman_google_marketing_tools/feed. For a feed that downloads from the browser, this is the address you give to the channel. For a feed saved to your server, opening it generates the file; the channel then reads the stored file, whose address is your domain followed by the folder, the file name and its extension.

When a generation fails, the last file generated correctly stays available instead of being replaced by an incomplete one.

CRON URL

For feeds saved to your server or to an external server, the window gives the script to run from a scheduled task, followed by feed_id= and the number of the feed. Feeds that download from the browser show "is not compatible with CRON Jobs".

Create the task in the scheduler of your hosting panel (Cron Jobs in cPanel, Scheduled Tasks in Plesk). The command is the path to PHP on your server, a space, and the value copied from the window:

0 3 * * * /usr/bin/php /home/user/public_html/catalog/controller/extension/module/gmt_cron.php feed_id=12

This example regenerates feed 12 every day at 03:00. The five values at the start are minute, hour, day of the month, month and day of the week. /usr/bin/php is an example: ask your hosting provider for the real path to PHP. Create one task per feed and space them a few minutes apart.

Still need help?

Open a support ticket from your account and our team will look at your store with you.