run_as_root / ext-magento2-google-shopping-feed
run_as_root/ext-magento2-google-shopping-feed
This module provides a google shopping product feed csv export.
General
Generate feed with product data.
Installations
composer require run_as_root/ext-magento2-google-shopping-feed
bin/magento setup:upgrade
Inventory System Compatibility
This module automatically detects and supports both inventory systems:
- Multi Source Inventory (MSI): If MSI modules are installed, the module will use the MSI system for stock management
- Legacy Catalog Inventory: If MSI is not available, the module automatically falls back to the legacy catalog inventory system
MSI Support (Optional):
If you want to use MSI features, install the MSI modules:
composer require magento/module-inventory-sales magento/module-inventory-sales-api
The module will automatically detect MSI availability and use the appropriate inventory system without any configuration changes.
Features
Feed generation
Generate product feed every 2 hours with minimal required attributes, for each storeview.
Places file into pub/media/run_as_root/feed/%s_store_%s_feed.xml.
Configurable Product Export Control
Configure how configurable products are exported to the feed:
- Only Parent Products: Export the configurable product itself with aggregated data from available children (lowest price, stock status based on child availability, parent product images)
- Only Child Products: Export child products that are visible individually (visibility levels: Catalog, Search, or Catalog + Search)
Technical Specification
Commands
| group | command | description |
|---|---|---|
| run_as_root | run_as_root:product-feed:execute | Runs feed generation for all store views. |
Crons
| group | cronjob | description |
|---|---|---|
| default | run_as_root_product_feed_exporter_cron | Runs feed generation based on run_as_root_product_feed/general/cron_schedule config - default each 15 minutes |
Entities
Attribute config
DTO: \RunAsRoot\GoogleShoppingFeed\Data\AttributeConfigData
Incapsulates the next information:
- attribute name/code
- handler class
List of attributes configurations can be found here: \RunAsRoot\GoogleShoppingFeed\Enum\AttributesToImportEnumInterface::ATTRIBUTES
Data providers
\RunAsRoot\GoogleShoppingFeed\DataProvider\AttributesConfigListProvider
Provides the list of DTOs ( AttributeConfigData ).
Used for CSV row data mapping from product - provides information regarding attributes that should be taken from the product and in wich way (handler).
See configuration list here: \RunAsRoot\GoogleShoppingFeed\Enum\AttributesToImportEnumInterface::ATTRIBUTES
\RunAsRoot\GoogleShoppingFeed\DataProvider\AttributeHandlerProvider
Provides attribute data provider (handler) of type \RunAsRoot\GoogleShoppingFeed\DataProvider\AttributeHandlers\AttributeHandlerInterface, by AttributeConfigData DTO.
\RunAsRoot\GoogleShoppingFeed\DataProvider\AttributeHandlers\AttributeHandlerInterface
Generic interface for attribute data providers.
Each attribute has its own data provider, that incapsulates current interface.
Data provider for specific attribute is configured here \RunAsRoot\GoogleShoppingFeed\Enum\AttributesToImportEnumInterface::ATTRIBUTES.
Services
\RunAsRoot\GoogleShoppingFeed\Service\GenerateFeedService
Perform feed generation for all storeviews with enabled feed generation.
\RunAsRoot\GoogleShoppingFeed\Service\GenerateFeedService is injected.
\RunAsRoot\GoogleShoppingFeed\Service\GenerateFeedService
Generate feed for specific store, based on feed enable*disable configuration.
Incapsulates attributes config provider \RunAsRoot\GoogleShoppingFeed\DataProvider\AttributesConfigListProvider and csv row mapper \RunAsRoot\GoogleShoppingFeed\Mapper\ProductToFeedAttributesRowMapper.
Performs iteration on all products provided by this collection provider \RunAsRoot\GoogleShoppingFeed\CollectionProvider\SimpleProductsCollectionProvider and adds rows into the CSV file.
Configuration
| tab | group | section | field |
|---|---|---|---|
| run_as_root | general | Product Feed Exporter | Enable |
| run_as_root | general | Product Feed Exporter | Cron Schedule |
| run_as_root | general | Product Feed Exporter | Category Whitelist |
| run_as_root | general | Product Feed Exporter | Category Blacklist |
| run_as_root | general | Product Feed Exporter | Configurables Export |
Configurables Export Options
The "Configurables Export" setting controls how configurable products are handled in the feed:
- Only Child Products (default): Exports child products that are visible individually (Catalog, Search, or Catalog + Search visibility)
- Only Parent Products: Exports the configurable product itself instead of children, with aggregated data:
- Price: Lowest price from available (enabled and in-stock) children
- Stock Status: In-stock if at least one child is available
- Images: Uses the configurable product's base image
- Skips configurable products with no available children
This setting is configurable per store view to allow different export strategies for different stores.
Extensability points
Add new attribute to feed
- Create new attribute data provider. @see interface
\RunAsRoot\GoogleShoppingFeed\DataProvider\AttributeHandlers\AttributeHandlerInterface. - Add configuration for new attribute in
\RunAsRoot\GoogleShoppingFeed\Enum\AttributesToImportEnumInterface::ATTRIBUTES.
Use a custom shipping data source
The shipping attribute only reads the shipping_tablerate table. To feed shipping costs from another source (Colissimo, GLS, ...), add a DI <preference> for \RunAsRoot\GoogleShoppingFeed\DataProvider\AttributeHandlers\ShippingProvider pointing to your own class implementing AttributeHandlerInterface. Its get(Product $product) must return a list of ['country' => 'DE', 'price' => '12.00 EUR'] entries.
Google Shopping Feeds Grid
Generated feeds could be reviewed inside Admin Backoffice
- Navigate to Marketing -> run_as_root -> Google Shopping Feed
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[1.1.0] - 2024-07-27
Added
- New "Configurables Export" system configuration option to control how configurable products are exported to the feed
- Support for exporting configurable parent products instead of child products
- Support for exporting only visible child products (Catalog/Search/Both visibility levels)
- Per-store view configuration for different configurable product export strategies
Changed
- Refactored configurable product handling logic in GenerateFeedForStore service
- Separated configurable and grouped product processing for better maintainability
- Enhanced configurable product export with proper price aggregation, stock status calculation, and image handling
Technical Details
- Added ConfigurableExportType source model for configuration dropdown options
- Extended FeedConfigProvider to include new configuration setting
- Updated system configuration XML with new field
- Comprehensive unit test coverage for all new functionality
- Maintained backward compatibility with existing feed generation behavior
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 1.8.1 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-11-30 08:55:57 |
| 1.8.0 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-11-25 09:24:47 |
| 1.7.0 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-11-17 12:36:49 |
| 1.6.0 | stable | Fail | Not yet tested Details | 2025-06-03 16:33:37 |
| 1.5.0 | stable | Not tested | Not yet tested Details | 2023-06-13 20:25:57 |
| 1.4.0 | stable | Not tested | Not yet tested Details | 2022-09-22 10:52:43 |
| 1.3.0 | stable | Not tested | Not yet tested Details | 2022-09-21 08:34:22 |
Requires 17
| Package | Constraint |
|---|---|
| magento/framework | * |
| magento/module-backend | * |
| magento/module-bundle | * |
| magento/module-catalog | * |
| magento/module-catalog-inventory | * |
| magento/module-config | * |
| magento/module-configurable-product | * |
| magento/module-cron | * |
| magento/module-customer | * |
| magento/module-directory | * |
| magento/module-eav | * |
| magento/module-grouped-product | ^100.4 |
| magento/module-import-export | * |
| magento/module-review | * |
| magento/module-store | * |
| magento/module-ui | * |
| psr/log | * |
Requires-dev 5
| Package | Constraint |
|---|---|
| magento/magento-coding-standard | ^31.0 |
| pdepend/pdepend | ^2.14 |
| phpunit/phpunit | ^10.0 |
| slevomat/coding-standard | ^8.12 |
| squizlabs/php_codesniffer | ^3.7 |
Suggests 2
| Package | Reason |
|---|---|
| magento/module-inventory-sales | For Multi Source Inventory (MSI) support. If not installed, the module will fallback to legacy catalog inventory. |
| magento/module-inventory-sales-api | Required when using MSI inventory system for stock management. |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 254 | 45 errors, 209 warnings (ruleset: Magento2), 19 auto-fixable with phpcbf |
| PHPMD | Warning | 15 | 15 rule violations (MissingImport:6, ExcessiveMethodLength:4, UnusedLocalVariable:2, UnusedFormalParameter:2, TooManyPublicMethods:1) |
| Cpd | Pass | 0 | |
| PHP Compatibility | Pending | 0 | |
| Composer validate | Info | 10 | valid; 10 advisory notes (composer validate --strict) |
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from run_as_root
View vendorTurn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.