run_as_root / ext-magento2-google-shopping-feed
This module provides a google shopping product feed csv export.
Installs: 1 870
Dependents: 0
Suggesters: 0
Security: 0
Stars: 40
Watchers: 5
Forks: 9
Open Issues: 3
Type:magento2-module
Requires
- magento/framework: *
- magento/module-catalog: *
- magento/module-configurable-product: *
- magento/module-directory: *
- magento/module-eav: *
- magento/module-import-export: *
- magento/module-inventory-sales: *
- magento/module-inventory-sales-api: *
- magento/module-review: *
- magento/module-store: *
- psr/log: *
Requires (Dev)
- magento/magento-coding-standard: ^31.0
- pdepend/pdepend: ^2.14
- phpunit/phpunit: ~9.5.20
- roave/security-advisories: dev-latest
- sebastian/phpcpd: ^6.0
- slevomat/coding-standard: ^8.12
- squizlabs/php_codesniffer: ^3.7
README
General
Generate feed with product data.
Installations
composer require run_as_root/ext-magento2-google-shopping-feed
bin/magento setup:upgrade
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
.
Technical Specification
Commands
Crons
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
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
.
Google Shopping Feeds Grid
Generated feeds could be reviewed inside Admin Backoffice
- Navigate to Marketing -> run_as_root -> Google Shopping Feed