Search by

run_as_root / ext-magento2-google-shopping-feed

mwltrDavidLambauer

This module provides a google shopping product feed csv export.

Package info

github.com/run-as-root/Magento-2-Google-Shopping-Feed

Type:magento2-module

pkg:composer/run_as_root/ext-magento2-google-shopping-feed

Statistics

Installs: 11 041

Dependents: 0

Suggesters: 0

Stars: 45

Open Issues: 7

1.6.0 2025-06-03 16:30 UTC

README

build

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

  1. Create new attribute data provider. @see interface \RunAsRoot\GoogleShoppingFeed\DataProvider\AttributeHandlers\AttributeHandlerInterface.
  2. Add configuration for new attribute in \RunAsRoot\GoogleShoppingFeed\Enum\AttributesToImportEnumInterface::ATTRIBUTES.

Google Shopping Feeds Grid

Generated feeds could be reviewed inside Admin Backoffice

  • Navigate to Marketing -> run_as_root -> Google Shopping Feed