haerriz/module-google-shopping-feed

Google Merchant Center API and Google Shopping Feed XML/CSV Generator for Magento 2

Maintainers

Package info

github.com/haerriz/magento2-google-shopping-feed

Type:magento2-module

pkg:composer/haerriz/module-google-shopping-feed

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.0 2026-07-29 11:14 UTC

This package is auto-updated.

Last update: 2026-08-01 04:37:46 UTC


README

Magento 2.4+ PHP 8.1+ License: MIT

Multi-channel product feed generator for Magento 2 with Google Merchant API sync, FTP/SFTP delivery, taxonomy mapping, cron scheduling, and admin wizard tooling.

Supported channels: Google Shopping, Meta/Facebook, Instagram, Snapchat, TikTok, Pinterest, Microsoft/Bing, Amazon, eBay, Rakuten, OpenAI/ChatGPT Commerce.

Requirements

  • Magento Open Source / Adobe Commerce 2.4.x
  • PHP 8.1 / 8.2 / 8.3
  • Magento cron configured
  • Optional: phpseclib (via Magento dependencies) for SFTP
  • Optional: Google Cloud service account for Merchant API sync

Installation

composer require haerriz/module-google-shopping-feed
bin/magento module:enable Haerriz_GoogleShoppingFeed
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Manual install:

mkdir -p app/code/Haerriz/GoogleShoppingFeed
# Copy the module contents into app/code/Haerriz/GoogleShoppingFeed
bin/magento module:enable Haerriz_GoogleShoppingFeed
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

After upgrading from an older release, run bin/magento setup:upgrade so declarative schema adds new profile fields such as identifier_exists_mode and export_configurable_mode.

Configuration

  1. Go to Stores → Configuration → Haerriz Extensions → Product Feed
  2. Enable the module
  3. (Optional) Configure Google Merchant API:
    • Merchant Account ID
    • Service Account JSON key (stored encrypted)
    • Target country / currency
    • API mode (production or sandbox)
  4. Create feed profiles under Marketing → Google Shopping Feeds

Feed profile wizard

  1. General: name, status, channel, filename
  2. Exclude categories
  3. Rename / map categories to channel taxonomy
  4. Basic product attributes (SKU, title, price, description, availability)
  5. Optional attributes (brand, GTIN, MPN, condition, UTM)
  6. Schedule (cron expression)
  7. Destination: Local / FTP / SFTP / Merchant API

Feed QA and identifiers

  • Live Preview shows completeness guidance for missing image, link, price, brand, GTIN, MPN, and description fields.
  • The QA report button downloads a CSV with sku, missing_field, severity, and remediation guidance.
  • By default, critical QA misses log warnings only. To block remote delivery when image/link/price are missing, enable Stores → Configuration → Haerriz Extensions → Product Feed → General Settings & Cron → Block Delivery on Critical QA Issues.
  • identifier_exists_mode=auto writes identifier_exists=no when both GTIN and MPN are absent. Use always_yes or always_no only when your catalog policy requires it.
  • Configurable products default to child variants only. The profile export_configurable_mode can switch to parent-only or parent-and-children.

CLI Commands

# Generate one profile
php bin/magento haerriz:feed:generate --profile=1

# Validate mapping/config
php bin/magento haerriz:feed:validate --profile=1

# Import Google taxonomy
php bin/magento haerriz:feed:import-taxonomy

# Sync / reconcile Merchant API
php bin/magento haerriz:feed:merchant-sync
php bin/magento haerriz:feed:merchant-reconcile

# Consume queued jobs / cleanup artifacts
php bin/magento haerriz:feed:consume-jobs
php bin/magento haerriz:feed:cleanup-artifacts

Security notes

  • Delivery passwords and Google service-account JSON are encrypted with Magento's encryptor.
  • Remote FTP/SFTP host validation blocks private, loopback, link-local, and reserved IPs (SSRF hardening).
  • Profile duplication scrubs credentials and resets lock/retry runtime state.
  • Admin ACL resources separate profile management, generation, downloads, jobs, and credentials.

Supported product types

Type Feed behavior
Simple Exported as one offer
Virtual / Downloadable Exported as one offer (no shipping weight metadata)
Configurable Expands to enabled child variants (item_group_id = parent SKU)
Grouped Expands to enabled associated products
Bundle Exported as the sellable parent offer

Currency for price fields is taken from the profile currency, then store currency (no hardcoded INR).

Marketplace Readiness

  • Do not commit Merchant API service-account JSON, FTP/SFTP passwords, private keys, or webhook secrets. Configure them in Magento admin only.
  • Run bin/magento setup:di:compile, bin/magento setup:upgrade --dry-run=1 where available, and module unit tests before packaging.
  • Verify ACL access for feed profile management, generation, downloads, jobs, and configuration.
  • Confirm generated feeds are written under pub/media, remote delivery credentials are encrypted, and QA warnings are reviewed before enabling delivery blocking.

Testing

vendor/bin/phpunit -c phpunit.xml

License

MIT License. Created by Haerriz.