For OpenCart 2.3, 3.0, 4.0 and 4.1
NEW IN 1.1: GOOGLE MERCHANT CENTER BY API
NEW IN 1.1: META CATALOGUE (FACEBOOK AND INSTAGRAM SHOPS) BY API
Feeds
- Google Shopping (XML), Facebook / Instagram (CSV) and Pinterest (CSV). Make as many feeds as you like, for example one per language, one per currency or one per category.
- Each feed has its own language, currency, category limit (with sub-categories), list of products to leave out, "only products in stock", special price sent as the sale price, prices with or without tax, a minimum price and a maximum number of products.
- Title template with {name} {brand} {model} {sku} {category}; titles are cut to 150 characters. Description from the product description or the meta description, as plain text.
- GTIN / barcode taken from EAN, UPC, ISBN, JAN or SKU, and MPN from MPN, model or SKU. On OpenCart 4.1 these are read from the product's code rows.
- Brand fallback for products without a manufacturer, condition (new, used, refurbished) and a default Google product category.
- Google product categories: type the number or the full path once per shop category; a product takes the first mapped category it belongs to.
- Product images: the main image and the additional images, as full addresses. Product links are the shop's own links.
The file and the report
- The file is kept and rebuilt when it is older than the hours you choose (0 = only when you call the cron address). A build that fails never replaces the last good file.
- Preview shows the first products before you publish. "Rebuild now" shows the report: products looked at, products written, the ones left out with the reason and the first product numbers, and warnings for products that stay in the feed (no description, no brand/GTIN/MPN, a GTIN with a wrong check digit, a title over 150 characters).
- Left out and reported: no image, no price, below the minimum price, out of stock (when you ask for stock only), not available to shoppers.
- A new secret key can be made for any feed; the old address stops at once.
Safe by design
- A feed address answers only with the right key; a wrong or missing key and a switched-off feed answer "Not found".
- The feed files are kept outside the web root, in the shop's storage folder.
- Text is escaped for XML; in the CSV, a title or description that starts like a spreadsheet formula is neutralised and control characters are removed.
- Admin changes need the Modify permission and a form post. Uninstall removes the settings and keeps your feeds and category mapping.
Notes
- The feeds follow the published Google, Meta and Pinterest field lists, but they were not submitted to those services during testing; check the first upload in Merchant Center, Commerce Manager or Pinterest and read what they report.
- The Merchant Center and Meta sending were tested against local stand-ins built from Google's Merchant API reference (products v1) and Meta's Catalog Batch API reference (Graph API v25.0), not against real accounts. For Meta, run "Check the connection" and a first rebuild and look at the catalogue in Commerce Manager. For Google: run "Check the connection" and a first rebuild with a few products, and look at Merchant Center before you rely on it.
- Merchant Center sending is for Google feeds and the shop's default store. Product variants are sent as one product each, as in the feed file (no item groups).
- Uninstalling removes the connection and its key, not the products already in Merchant Center: Google lets them expire after 30 days without an update. Use "Remove from Merchant Center" first if they should go at once.
- One item per product. Product variants (colour/size options) are not sent as separate items or item groups.
- Prices are the product's price in the feed currency, with the special price as the sale price when you choose that; customer-group discounts and quantity discounts are not sent.
- Shipping and tax rules are left to the settings you keep in Merchant Center / Commerce Manager.
- Large catalogs are read in batches of 200 products; a very large shop should set a refresh time of several hours and let a cron job call the cron address rather than waiting for a visitor-triggered rebuild.
How it was tested
OpenCart 2.3.0.2, 3.0.5.1, 4.0.2.3 and 4.1.0.4, installed through the real admin installer: 158 to 163 automated checks per version: 53 for Merchant Center against a local stand-in of Google's token endpoint and Merchant API that checks the signature of the service account token (connection, data source, registration, the first send, only changes sent again, deletes, statuses over many pages, a refused product, Google down, a new label, remove, permissions), and 27 for the Meta catalogue against a local stand-in of the Graph API (token check, the batch call, item fields, unchanged items, a refused item, items marked invalid, unfinished batches, deletes, Meta down, remove, type change); plus 62 unit checks of the feed rules and the API mapping. An upgrade from 1.0 was tested on all four versions (feeds and their addresses kept). The Merchant Center and Meta cards were used in Edge on 4.1, from saving the key and token to the problems list, with no script errors and the page fitting a phone screen.