CREATIVITY

PRECISION

INNOVATION

SPARCLEY

0%
Close-up of nested XML-style markup code with coloured tags on a dark screen
BACK TO BLOG

OpenCart XML Feed Generator for Google, Meta and Price Portals

Universal XML Feed Generator is our new OpenCart XML feed generator: one module for Google Merchant, Meta, edrone, price portals, CSV and sitemaps.

CategoryOpenCart
TopicProduct feeds
Read Time6 min
Article#09 / 15
01

What is the Universal XML Feed Generator?

Universal XML Feed Generator is an OpenCart XML feed generator for OpenCart 3.0.x stores that need their product data in several places at once: Google Merchant Center, the Meta (Facebook) catalogue, the edrone marketing platform, price comparison portals and a search engine sitemap. It is built for store owners and agencies who no longer want a separate extension, or a hand-written script, for every sales channel.

It is one of four new SPARCLEY modules now listed on the OpenCart Marketplace, alongside our DPD tracking, supplier import and product video extensions. Version 1.6 costs $59 and includes 12 months of free support and full documentation. We developed and tested it on a live OpenCart 3 store before publishing it on the marketplace.

02

Which feeds can the OpenCart XML feed generator create?

Each feed starts from a template (preset). Applying a preset fills in the structure, fields and format settings, while any filters you have already set are kept. You can create as many feeds as you need, each with its own URL and access key.

The Custom template is what makes the module universal: if a portal or partner asks for a layout that is not on the list below, you define the root element, item element, item ID attribute and every tag name yourself, without writing PHP. The built-in templates are:

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

How do you set up a product feed step by step?

Installation uses the standard OpenCart Extension Installer and does not change any core files. The package makes no OCMOD file changes, so there is nothing to merge with your other modifications.

If the store already has the OpenCart Google Sitemap feed or older kainos.lt, edrone or kaina24 extensions enabled, Install creates a matching disabled feed for each from its template. The kainos.lt, edrone and kaina24 feeds take over the old extension's main settings where it has them (manufacturer, categories, language, store, tax class, condition, delivery price and time); the Google Sitemap feed gets the template only, and once you enable and generate it, it overwrites the existing sitemap.xml in the store root. The old extensions are left untouched, so you can compare the output before switching.

  • Upload the .ocmod.zip in Extensions > Installer, then refresh Extensions > Modifications.
  • Install “Universal XML Feed Generator” under Extensions > Extensions > Modules. Install enables the module and creates a random shared secret key.
  • Open the new “XML feed generator” admin menu and choose “Add new feed”.
  • Pick a template, click “Apply preset”, adjust the tabs and save. The feed URL with its key appears.
  • Press “Generate now” in the feed list, check the preview, then add the URL to Google Merchant Center, Meta or the portal.
04

What product data and filters can you control?

Every feed has 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.

Version 1.6 adds Unique titles. Portals such as kainos.lt and kaina24.lt merge or drop offers from one shop that share the same title, so a duplicate title gets the model code in brackets, or the MPN, SKU or product ID when needed. Titles stay within each template's limit (150 characters for Google and edrone, 200 for Facebook, 255 for kainos.lt and kaina24.lt), and only the feed changes, never the product names in your shop.

Some 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.
  • An empty MPN falls back to the product model.
  • 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 are feeds updated and protected from broken files?

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.

Scheduling works through PHP CLI (one command for all enabled feeds or one per feed, plus a test mode that builds a small sample without touching the public file) or through a generation URL on hosting without shell access. The exact commands are shown in the admin. Feed URLs are protected by per-feed keys, and a shared secret key can generate all feeds at once.

If any of the checks below 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. The XML validity check runs when the PHP XMLReader extension is available (recommended); without it the new file is still written atomically, but its XML is not validated. Only one generation of a feed runs at a time; a parallel request is logged as busy.

Before a new file replaces the public one, it is written to a temporary file and checked:

  • 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, when PHP XMLReader is available on the server.
06

How do you know when a feed stops updating?

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. The message also lists changes against the previous file, such as products added and removed, price changes and stock changes, plus the first 20 removed product IDs. The last 2,000 entries per feed are kept.

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

07

Can it generate an XML sitemap as well?

Yes. The Sitemap format covers the home page, products, categories, manufacturers and information pages, with priority and change frequency set per page type, optional image tags and a choice between canonical product URLs (with category) or short ones. URLs disallowed in robots.txt, duplicate URLs and, optionally, empty categories are left out. Above 50,000 URLs or about 50 MB, the sitemap is split into several files with a sitemap index.

With “File in store root” the module writes sitemap.xml directly to the store root and replaces the existing file on the first generation, so it can take over from a separate sitemap extension.

08

Requirements, price and current limitations

Feeds export one item per product: separate items for product options or variants are not generated. Each destination may also require additional product data, so check the diagnostics in Google Merchant Center or the portal after the first upload.

If you need a custom feed layout, help setting up Merchant Center, or the module installed and configured for you, we can handle it as part of our OpenCart development work.

  • OpenCart 3.0.x (listed as compatible with 3.x.x.x on the marketplace).
  • PHP 7.0 or newer (as supported by your OpenCart 3.0.x) with XMLWriter; 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.
  • English admin interface.
  • $59 on the OpenCart Marketplace, with 12 months of free support and documentation included.
09

Frequently asked questions

Which OpenCart versions does the Universal XML Feed Generator support?

It is built for OpenCart 3.0.x and is listed as compatible with 3.x.x.x on the OpenCart Marketplace. It needs PHP 7.0 or newer (as supported by your OpenCart 3.0.x) with the XMLWriter extension.

Can it create a Google Merchant Center feed?

Yes. The Google Merchant template produces an RSS 2.0 feed with the g: namespace, exports only valid GTINs and uses the product model when the MPN is empty. You then add the feed URL in Merchant Center.

Are product options or variants exported as separate items?

No. Each feed exports one item per product, and separate items for individual options or variants are not generated.

What happens if a feed generation fails?

The new file is not published and the previous good file stays online. The reason appears in the activity log, and the daily check reports the problem with a suggested fix.

Does the module modify OpenCart core files?

No. The package makes no OCMOD file changes, and the module works through OpenCart 3 events and its own admin pages.

Can it replace my existing feed extensions?

Install detects the OpenCart Google Sitemap feed and older kainos.lt, edrone and kaina24 feed extensions and creates matching disabled feeds. The kainos.lt, edrone and kaina24 feeds take over the old extensions' main settings, while the Google Sitemap feed gets the template only, so review its settings before enabling it. The old extensions stay untouched until you enable the new feeds and give the new URLs to each service.

Let's Build
Something.

From concept to live — premium design, real results.