The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

561 Modules
344 Ready
210 Need Help
🏆 Leaderboard
Stable v1.0.2

Magento 2 Catalog Generator Module

qoliber/m2-catalog-generator

Generates Magento catalogs from YAML configuration files. Uses direct SQL queries to create categories, products, websites, and customer groups.

17
Downloads
Below average
23
GitHub Stars
Below average
11mo ago
Last Release
1
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
7 warnings
PHPStan Level 8

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.2 on Magento 2.4.8-p3
Dec 30, 2025

Share This Module's Status

Magento 2 Catalog Generator Module Magento compatibility status badge

README

Loaded from GitHub

Magento 2 Catalog Generator Module

This is a Magento 2 module for generating catalogs efficiently based on YAML configuration files. It supports the creation of categories, products, customer groups, websites, and more, directly using SQL queries for improved performance.


Installation

  1. Install the module using composer

    composer require qoliber/m2-catalog-generator
    
  2. Run the following commands to enable the module and clear cache:

    php bin/magento module:enable Qoliber_CatalogGenerator
    php bin/magento setup:upgrade
    php bin/magento cache:flush
    

How to use:

Command Usage

To generate a catalog, use the following console command:

php bin/magento qoliber:catalog:generate [file.yml]

Important information

Entire product catalog and related tables are completely wiped out of all testing / live data. **You can view CleanUp class in Sql directory

Replace [file.yml] with the path to your YAML configuration file. Sample configurations can be found in the _samples directory (small.yml, medium.yml, and large.yml).

Example:

php bin/magento qoliber:catalog:generate vendor/qoliber/m2-catalog-generator/_samples/small.yml

Module Features

  • Flexible Configuration: Define catalogs using YAML configuration files.
  • Optimized Performance: Leverages direct SQL queries for faster data population.
  • Modular Architecture: Easily extendable and well-organized codebase.
  • Customizable Entities:
    • Products (Simple, Configurable, Bundle, Grouped)
    • Categories
    • Websites
    • Store Views
  • Attribute Handling: Populates and combines configurable attributes efficiently.
  • Attribute Handling: Populates and combines configurable attributes efficiently.
  • Creating randomized product images
  • Product

Module Structure

Below is an overview of the module’s directory structure:

Key Components

  • Api: Defines interfaces for extensibility and loose coupling.
  • Config: Handles configuration parsing and validation.
  • Console: Contains CLI commands to trigger catalog generation.
  • Data: Implements data generation and population logic.
  • Generators: Logic for creating entities (e.g. products, categories).
  • Populators: Populates entity attributes.
  • Reader: Reads YAML configuration files.
  • Resolver: Resolves entity names and dependencies.
  • Service: Orchestrates catalog generation and cleanup.
  • Sql: Handles raw SQL operations for optimal performance.
  • Task: Executes specific tasks like assigning products to categories and generating URLs.

Sample YAML Files

Example YAML files are available in the _samples directory:

  • small.yml: Minimal configuration for quick testing.
  • medium.yml: Moderate configuration for medium-sized catalogs.
  • large.yml: Comprehensive configuration for large catalogs.

Developer Notes

  • Dependency Injection: The module follows Magento’s DI pattern for better flexibility

  • Testing: Unit tests are available under Test/Unit.

  • Code is passing phpstan-8 and phpcs magento-coding-standards

    img.png

Example Classes:

  • Generators: Found in Data/Generators, these create catalog entities.
  • Populators: Found in Data/Populators, these populate attributes for entities.
  • Tasks: Found in Task, these handle specific catalog operations.

License

This module is open-source and distributed under the MIT License.


For further questions or contributions, feel free to contact us or submit a pull request!

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.