Search by

will-wright1 / magento2-product-feed

will-wright1

Google Merchant Center product feed generator for Magento 2 and Adobe Commerce with configurable profiles, scheduling and validation.

Package info

github.com/will-wright1/magento2-product-feed

Homepage

Documentation

Type:magento2-module

pkg:composer/will-wright1/magento2-product-feed

Statistics

Installs: 22

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-11-29 18:29 UTC

This package is auto-updated.

Last update: 2026-11-29 18:31:38 UTC


README

Latest stable version Packagist downloads Quality Licence

Built by William James Wright. Module guide and setup help.

Magento Product Feed is a self-hosted Google Merchant Center feed generator for Magento Open Source and Adobe Commerce. It was generalised from proven production implementations into the installable MageProductFeed_MerchantFeed module.

The module generates Google RSS/XML files from configurable profiles without depending on a paid feed extension or an external feed service. It is designed for safe shadow rollouts: install it alongside an existing generator, compare a new Merchant Center data source, and switch only after the new feed has processed cleanly.

Features

  • Any number of primary, supplemental or internal-export profiles.
  • Store-view, product-type, visibility, category and EAV attribute rules.
  • Match-all or match-any conditions and deterministic SKU-based sharding.
  • Child-SKU offers with configurable-parent canonical URLs and item_group_id.
  • MSI website-stock availability with a legacy stock-status fallback.
  • Tax-inclusive regular and sale prices, sale effective dates and store-level images.
  • Configurable fallback mappings for brand, GTIN, MPN, colour and material.
  • Google-compatible custom labels and product category defaults.
  • GTIN checksum checks, required-field checks and duplicate-ID detection.
  • CSV reports for exclusions and warnings.
  • Atomic publication, optional previous-file retention and SHA-256 checksums.
  • Run history, cron scheduling, locking, admin management and CLI tools.
  • Hard overlap protection for related primary profiles.

Generated feeds are public files under pub/media/merchant-feeds/. Exclusion and warning reports are kept out of the public web root under var/merchant-feeds/reports/.

Compatibility and release status

Version 1.0.1 fixes dependency injection compilation in Magento and improves feed generation performance.

Component Declared compatibility Verification
Magento Open Source / Adobe Commerce 2.4.4 or newer within the dependency ranges in composer.json The 1.0.1 changes were tested on Magento Open Source 2.4.9 with PHP 8.5.9, including setup upgrade, dependency injection compilation and primary and supplemental feed generation. Adobe Commerce and older versions need store-specific staging checks.
PHP 8.1 or later within PHP 8, subject to the Magento release's PHP requirements GitHub Actions runs smoke and syntax checks across PHP 8.1–8.5. Use PHP 8.5 for Magento 2.4.9.
Inventory Magento Inventory Management (MSI) Required; supported Magento releases include MSI. A legacy stock-status fallback is used where applicable.
PHP extensions mbstring, SimpleXML, XMLReader and XMLWriter Declared as Composer requirements and exercised by the release checks where relevant.

Magento cron must be installed and running for scheduled generation. Dependency compatibility means Composer can resolve the package; it is not a substitute for validating prices, stock, variants and feed diagnostics against the target catalogue.

The module has no dependency on Amasty Feed, Wyomind Simple Google Shopping or another feed extension.

Installation

Composer

Install the published package from Packagist using the Magento project's existing Composer setup. No additional repository configuration is required:

composer require will-wright1/magento2-product-feed
bin/magento module:enable MageProductFeed_MerchantFeed
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Use the site's normal zero-downtime deployment process in production.

Upgrade

Update the package within the constraints recorded by the Magento project, then run the normal Magento deployment steps:

composer update will-wright1/magento2-product-feed --with-dependencies
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Review CHANGELOG.md before upgrading. Generated feed files and previous successful files are not removed by these commands.

Manual installation

Copy this repository's contents to:

app/code/MageProductFeed/MerchantFeed

Then run the four Magento commands shown above, starting with module:enable.

First feed

  1. Confirm Stores > Configuration > General > Locale Options > Timezone is correct. Profile schedules use that timezone and are stored internally as UTC.
  2. Open Stores > Configuration > Product Feeds > Merchant Feeds and review the output directory, previous-file retention and batch size.
  3. Open Marketing > Merchant Feeds > Feed Profiles and create a profile.
  4. Select the correct store view and check the country, language, feed label and currency. New-profile values are derived from the first configured storefront and remain editable.
  5. Start with simple products and all visibility values when configurable children need their own offers.
  6. Save, preview, generate and validate the profile from the CLI.
  7. Add the generated fetch URL as a separate Merchant Center data source and compare diagnostics before replacing an existing source.

Start with one primary profile containing all eligible products. Split a catalogue only for ownership, processing or operational reasons. Profiles that belong to the same logical primary source should share a primary_group; generation fails if their rules select the same product.

In 1.0.1, a profile currency that differs from the store's base currency needs a Magento exchange rate. Generation stops and retains the previous successful feed if the rate is missing.

Profile types

primary emits complete Google offers and participates in overlap protection. It requires title, description, link, availability, price and an image.

supplemental emits ID-matched availability, price, sale-price and custom-label updates. Its IDs are generated by the same rules as primary feeds.

export emits the full Google-shaped XML but does not participate in primary overlap protection.

Unique SKUs up to 50 characters are used unchanged as offer IDs. Duplicate or longer SKUs receive a stable entity-ID suffix.

Product rules

Category IDs are comma-separated. Attribute rules support:

  • equals and does not equal;
  • in and not in, with comma-separated values;
  • contains and does not contain;
  • greater-than and less-than variants;
  • empty and not empty.

For select and multiselect attributes, enter Magento option IDs. Enabled status and store website membership are always enforced in addition to profile rules.

Attribute mapping

Attribute mapping is an optional JSON object. Each value is an ordered list of fallback Magento attribute codes:

{
  "brand": ["manufacturer", "brand"],
  "gtin": ["gtin", "ean", "ean13", "barcode", "upc"],
  "mpn": ["mpn", "manufacturer_part_number"],
  "color": ["color", "colour", "finish"],
  "material": ["material"]
}

These portable defaults are used when the mapping is blank. Invalid GTINs are omitted and recorded as warnings. Enable identifier_exists=no only for products that genuinely have no manufacturer-assigned GTIN or MPN.

Custom-label JSON maps indexes 0-4 to an attribute code or one of the helpers price_band, availability and product_type:

{"0":"price_band","1":"product_type","2":"manufacturer"}

CLI

bin/magento mage-product-feed:list
bin/magento mage-product-feed:preview --profile=google-primary --limit=10
bin/magento mage-product-feed:generate --profile=google-primary
bin/magento mage-product-feed:generate --all
bin/magento mage-product-feed:validate --profile=google-primary
bin/magento mage-product-feed:overlaps
bin/magento mage-product-feed:overlaps --group=google_uk

The admin Queue Generation action marks a profile due immediately. Magento's five-minute module cron then claims and generates it. Normal hourly, four-hourly, daily and weekly schedules are recalculated after each run.

Scope and limitations

  • The module produces Google-compatible RSS/XML files; it does not submit them through the Google Merchant API.
  • Feed files are intentionally public so Merchant Center can fetch them. Exclusion and warning reports remain outside the public web root.
  • Product selection and attribute mapping are configured per profile. Existing vendor template expressions are not imported.
  • Tax, stock, parent/child relationships and store-view data vary between catalogues. Validate a generated feed against a non-production Merchant Center data source before switching a live source.
  • Direct setup and compatibility support is separate from public installation, normal use and GitHub issue reporting.

Safe rollout

  1. Deploy the module without disabling the current feed generator.
  2. Recreate the existing selection and mapping explicitly; vendor-specific template expressions are not imported.
  3. Run preview, generate, validate and overlaps as appropriate.
  4. Inspect item count, exclusions, warnings, sample variants, tax-inclusive prices, stock and image URLs.
  5. Submit the new URL as a separate Merchant Center data source.
  6. Switch only after a clean processing cycle, retaining the old source and previous generated file for rollback.

Existing Air Supplies and Majorelle installations have client-specific module IDs and database tables. See Migration from the project modules before replacing either one.

Registration and support

Installation, feed generation and updates do not require registration. Public bug reports and enhancement requests remain available through GitHub Issues.

Register this module or request direct setup and compatibility support. The form asks for an email address and support description; the store URL is optional. Do not include Magento Admin URLs, credentials or private store identifiers.

Stores that also install confirm-actions/magento2-confirm-actions can open Stores > Configuration > William James Wright > Module Registration in Default Config. That shared screen detects MageProductFeed_MerchantFeed, includes the installed Composer version when available and can register several supported modules together. Without the shared screen, use the website form above.

Testing

The dependency-free release checks can run without a Magento installation:

composer validate --strict --no-check-publish
php dev/tests/smoke.php
find . -path './vendor' -prune -o -name '*.php' -exec php -l {} \;

When dependencies are installed, run the PHPUnit suite with:

vendor/bin/phpunit

These checks validate package metadata, PHP syntax and isolated feed logic; they do not boot Magento. The most important runtime acceptance test is a generated feed processed as a non-production Merchant Center data source against the target catalogue.

Licence

MIT. See LICENSE. Copyright is credited to William James Wright and the Magento Product Feed contributors.