will-wright1 / magento2-product-feed
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
Type:magento2-module
pkg:composer/will-wright1/magento2-product-feed
Requires
- php: ^8.1
- ext-mbstring: *
- ext-simplexml: *
- ext-xml: *
- ext-xmlreader: *
- ext-xmlwriter: *
- magento/framework: ^103.0.4
- magento/module-backend: ^102.0.4
- magento/module-catalog: ^104.0.4
- magento/module-catalog-inventory: ^100.4.4
- magento/module-config: ^101.2.4
- magento/module-cron: ^100.4.4
- magento/module-inventory-sales-api: ^1.2
- magento/module-rule: ^100.4.4
- magento/module-store: ^101.1.4
- magento/module-tax: ^100.4.4
- magento/module-ui: ^101.2.4
- magento/module-url-rewrite: ^102.0.4
Requires (Dev)
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.0 || ^12.0
Suggests
- confirm-actions/magento2-confirm-actions: Provides the shared William James Wright Module Registration screen and direct-support links in Magento Admin.
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-29 18:31:38 UTC
README
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
- Confirm Stores > Configuration > General > Locale Options > Timezone is correct. Profile schedules use that timezone and are stored internally as UTC.
- Open Stores > Configuration > Product Feeds > Merchant Feeds and review the output directory, previous-file retention and batch size.
- Open Marketing > Merchant Feeds > Feed Profiles and create a profile.
- 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.
- Start with
simpleproducts and all visibility values when configurable children need their own offers. - Save, preview, generate and validate the profile from the CLI.
- 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
- Deploy the module without disabling the current feed generator.
- Recreate the existing selection and mapping explicitly; vendor-specific template expressions are not imported.
- Run
preview,generate,validateandoverlapsas appropriate. - Inspect item count, exclusions, warnings, sample variants, tax-inclusive prices, stock and image URLs.
- Submit the new URL as a separate Merchant Center data source.
- 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.