Cookies on sparcley.co.uk

We use necessary cookies to make this site work. With your consent, we would also use Google Analytics cookies to see how the site is used; they stay off unless you accept. See our Cookie Policy.

Close-up of colour-highlighted HTML and SVG markup on a dark code editor screen

Published · Updated · 10 min read

OpenCart XML feed generator for Google Shopping and Meta

Universal XML Feed Generator is a $59 OpenCart XML feed generator that turns one OpenCart 3 catalogue into Google Merchant Center, Meta catalogue, price portal, CSV and sitemap feeds, each with its own URL. Merchant Center fetches the feed URL on a schedule, and every new file is checked before it replaces the live one, so a failed run never leaves Google with an empty feed.

CategoryOpenCart
TopicProduct feeds
Read Time10 min
Article#09 / 15

Key takeaways

  • Universal XML Feed Generator costs $59 on the OpenCart Marketplace, with 12 months of free support, and runs on OpenCart 3.0.x with PHP 7.4 or newer.
  • Google Merchant Center requires seven attributes for every product – id, title, description, link, image_link, availability and price – plus a GTIN, brand or MPN where one exists.
  • UK feed prices must include VAT, and titles are kept within Google's 150-character limit.
  • A new file replaces the live feed only if it contains products, is valid XML and has not lost more than 30% of its products (the default) since the last good run.
  • Feeds export one item per product, so product options and variants are not sent as separate items.
01

What does Google Shopping need from an OpenCart product feed?

Google Shopping needs a product feed URL that Merchant Center fetches on a schedule, with seven required attributes for every product. These are the seven attributes required by Google's product data specification: id, title, description, link (the product page), image_link (the main image), availability and price.

We built Universal XML Feed Generator as part of our OpenCart development work, alongside our own modules for DPD tracking, supplier import and product video, and tested it on a live OpenCart 3 store before listing it.

Product identifiers come on top: a GTIN for any product that has one from the manufacturer, a brand for most new products, and an MPN when no GTIN exists. Descriptions can be up to 5,000 characters.

The Google Merchant Center template turns your OpenCart catalogue into that structure: an RSS 2.0 file with Google's g: namespace, titles kept within Google's 150-character limit, an EAN exported as GTIN only when its length and check digit are valid, and the product model used when the MPN field is empty. That is why the model field should hold the manufacturer's part number, not an internal shop code.

For a UK store, feed prices should be in GBP, match the price on the product page and at checkout, and include VAT: Google's price specification lists the United Kingdom among the countries where the price must include VAT, while US and Canadian prices exclude tax.

A valid feed does not guarantee that every product will be approved or shown: Merchant Center still reviews each item against its own policies. The same structured product data – identifiers, prices and availability – is also what AI shopping assistants read when they compare products.

02

Which feeds can the OpenCart XML feed generator create?

The OpenCart XML feed generator creates feeds for Google Merchant Center, Meta (Facebook) catalogues, edrone and price portals, plus CSV, Google Sitemap and Custom XML. The price portals are the Lithuanian kainos.lt and kaina24.lt; every feed is built from a template and has its own URL and access key. You can run as many feeds as you need. Applying a template (preset) fills in the structure, fields and format settings, while any filters you have already set are kept.

For Meta, the Facebook catalogue template creates an OpenCart Facebook catalogue feed that you add to Meta Commerce Manager as a scheduled data feed. Because Google and Meta feeds have separate URLs, you can filter and price them differently.

The Custom template is what makes the module universal: for a portal or partner whose layout is not on the list, you define the root element, item element, item ID attribute and every tag name yourself, without writing PHP. That is how you build a price comparison feed for a portal with no template of its own.

Can it also generate an XML sitemap? Yes. The Google Sitemap template works as an OpenCart XML sitemap generator for the home page, products, categories, manufacturers and information pages, with priority and change frequency per page type and optional image tags. It leaves out URLs disallowed in robots.txt, duplicate URLs and, optionally, empty categories, and above 50,000 URLs or about 50 MB it splits the sitemap into several files with a sitemap index. With “File in store root”, it writes sitemap.xml to the store root and replaces the existing file on the first generation, so it can take over from a separate sitemap extension.

  • Google Merchant Center (RSS 2.0 with the g: namespace)
  • Meta / Facebook catalogue
  • edrone (Google Merchant Center standard layout)
  • kainos.lt and kaina24.lt (Lithuanian price comparison portals)
  • An OpenCart CSV product export, with a choice of delimiter and an optional UTF-8 BOM so Excel opens it correctly
  • Google Sitemap (sitemap.xml)
  • Custom XML in your own layout
03

How do you set up an OpenCart Google Shopping feed step by step?

You can set up an OpenCart Google Shopping feed in six steps, from installing the module to Merchant Center's first fetch. Installation uses the standard OpenCart Extension Installer, changes no core files and makes no OCMOD changes, so there is nothing to merge with your other modifications.

If the store already uses the OpenCart Google Sitemap feed or older kainos.lt, edrone or kaina24 extensions, Install creates a matching disabled feed for each and leaves the old extensions untouched, so you can compare the output before switching.

The steps for an OpenCart Google Merchant Center feed:

  1. Upload the .ocmod.zip in Extensions > Installer, then refresh Extensions > Modifications.
  2. Install “Universal XML Feed Generator” under Extensions > Extensions > Modules; this enables the module and creates a random shared secret key.
  3. Open the new “XML feed generator” admin menu and choose “Add new feed”.
  4. Pick the Google Merchant Center template, click “Apply preset”, set the language, currency (GBP for the UK) and VAT on the Prices and data tab, then save to get the feed URL with its key.
  5. Press “Generate now” in the feed list and check the preview.
  6. Add the feed URL in Google Merchant Center as a product data source from a file, choose how often Google should fetch it and, after the first fetch, fix the product issues it reports in OpenCart or in the feed settings.
04

Which product data and filters can you control?

You control each feed's fields, product filters and prices separately, across six tabs: General, Structure and fields, Filters, Prices and data, Sitemap and Output. The field editor lets you switch fields on or off, change their order, rename XML tags or CSV columns, wrap values in CDATA, skip empty fields and set fixed values.

Filters cover categories (with subcategories), manufacturers, enabled products only, quantity above zero, minimum and maximum final price, and excluded product IDs or models. On the Prices and data tab you set the language, currency, store, VAT, special prices, a percentage price coefficient, delivery price and time, a quantity cap and image sizes. Currency and VAT are set per feed, so a UK Google Shopping feed in GBP with VAT and a feed for another market can share one catalogue.

Since version 1.6, the module can also make titles unique, because portals such as kainos.lt and kaina24.lt merge or drop a shop's offers that share a title: a duplicate gets the model code in brackets, or the MPN, SKU or product ID. Titles stay within each template's limit (150 characters for Google and edrone, 200 for Facebook, 255 for the two portals), and only the feed changes, never the product names in your shop.

A feed is only as good as the catalogue behind it: products left in a catch-all category or imported without brands and identifiers reach Google and Meta in exactly that state, so a clean category tree and complete supplier data come first.

These data rules apply to every format, because they are common reasons for feeds being rejected:

  • EAN/GTIN is exported only when it has 8, 12, 13 or 14 digits and a correct check digit; 13-digit in-store codes starting with 2 are skipped.
  • Quantity is never negative: an oversold product is exported with 0.
  • Selected stock statuses (for example “2-3 Days”) can mark out-of-stock products as available, with the delivery days taken from the status name.
05

How is the feed updated without publishing a broken file?

Every new feed file is written to a temporary file and checked before it replaces the public one. If a check fails, the previous good file stays online and the reason is logged, so Google Merchant Center or a portal keeps receiving the last good feed instead of an empty one.

Each feed has two output modes. A dynamic URL serves a cached file and rebuilds it on request once it is older than the freshness (TTL) you set. A static file on your server is rebuilt by cron or the “Generate now” button. Both modes can also produce a .gz copy.

Generation runs from cron through PHP CLI, with a test mode that leaves the public file alone, or from a generation URL on hosting without shell access; the admin shows the exact commands. Feed URLs are protected by per-feed keys, and a shared secret key can generate all feeds at once.

Only one generation of a feed runs at a time, and a parallel request is logged as busy.

Before a new file replaces the public one, it must pass these checks:

  • it contains at least one product;
  • the product count has not dropped by more than the allowed percentage (30% by default) compared with the last successful run;
  • the XML is valid, checked when the PHP XMLReader extension (recommended) is available; without it, the file is still written atomically but not validated.
06

How do you know when a product feed stops updating?

A daily check after 07:00 tells you. It flags any OpenCart product feed that failed, was never generated or has not been updated for more than 36 hours, any product drop of more than 20% and any generation that appears to hang, and every problem comes with a suggested fix. The check is started by the first storefront page OpenCart renders after 07:00. The report can be emailed every day or only when there are errors or new warnings, and results are stored for 90 days.

The activity log records every generation with its source (cron, cron URL, admin button or public URL), status, product count, duration, file size and message. It also lists changes against the previous file: products added and removed, price and stock changes, and the first 20 removed product IDs. The last 2,000 entries per feed are kept.

Merchant Center only reports problems with the file it fetched; the daily check and the activity log also tell you from the store side when a feed has stalled or suddenly lost products.

07

What does the OpenCart feed module cost and what does it need?

Universal XML Feed Generator costs $59 on the OpenCart Marketplace, with 12 months of free support. Documentation is included, and the admin interface is in English.

Feeds export one item per product: separate items for product options or variants are not generated, so a product sold in several sizes or colours as options appears in Google and Meta as one item. Each destination, whether Merchant Center, Commerce Manager or a portal, may also ask for extra product data of its own.

If you need a custom feed layout, help setting up Merchant Center or the module installed and configured for you, we can do it for you, and we reply within 24 business hours. For an example of that work, see an OpenCart store we built from a Figma design.

Technical requirements:

  • OpenCart 3.0.x (listed as compatible with 3.x.x.x on the Marketplace).
  • PHP 7.4 or newer with the XMLWriter extension; XMLReader is recommended for XML validation.
  • Optional: ZipArchive (download all feeds as a ZIP), zlib (.gz files), cURL (daily check on servers other than LiteSpeed / PHP-FPM) and cron access.
08

OpenCart XML feed generator FAQ

How do I get my OpenCart products into Google Shopping?

With Universal XML Feed Generator, create a feed from the Google Merchant Center template and press Generate now. Then add the feed URL in Merchant Center as a file data source with a fetch schedule, and fix any product issues its diagnostics report.

Which OpenCart versions does the feed generator support?

Universal XML Feed Generator supports OpenCart 3.0.x and is listed as compatible with 3.x.x.x on the OpenCart Marketplace. It needs PHP 7.4 or newer with the XMLWriter extension.

Can it create a Facebook (Meta) catalogue feed as well?

Yes. Universal XML Feed Generator has a Meta / Facebook catalogue template that keeps titles within 200 characters, and each feed has its own URL and key, so Google and Meta feeds run side by side.

Are product options or variants exported as separate items?

No. Universal XML Feed Generator exports one item per product; separate items for options or variants are not generated.

What happens if a feed generation fails?

Universal XML Feed Generator does not publish the new file: the previous good feed stays online and the reason is recorded in the activity log.

How much does the OpenCart feed module cost?

Universal XML Feed Generator costs $59 on the OpenCart Marketplace, including 12 months of free support.

09

Sources

From concept to live — premium design, real results.