Markus Michalski FAQ

XML Sitemap Generator: Technical Details

Technical details of the XML Sitemap Generator for OXID eShop 7: generated files, XML structure, actual flow, classes, multi-language behaviour, database table, lifecycle and limits.

Deutsche Version

Back to overview

XML Sitemap Generator: Technical Details

Generated files

All files are located in the output directory. With the default settings that is source/export/:

source/export/
β”œβ”€β”€ sitemap.xml                 # sitemap index
β”œβ”€β”€ sitemap-products.xml        # products
β”œβ”€β”€ sitemap-categories.xml      # categories
β”œβ”€β”€ sitemap-cms.xml             # CMS pages
β”œβ”€β”€ sitemap-manufacturers.xml   # manufacturers
└── sitemap-static.xml          # static URLs (only with the setting enabled)

At most one file is created per type. For products, categories, CMS pages and manufacturers it contains at most 50,000 URLs, the static sitemap has no limit. File names with numbers such as sitemap-products-1.xml are not produced by the module. The directory source/export/sitemap, which is created on activation, stays empty with the default settings.

XML structure

Every URL is written with loc, lastmod, changefreq and priority:

<url>
  <loc>https://shop.example.com/product-page/</loc>
  <lastmod>2026-01-15</lastmod>
  <changefreq>weekly</changefreq>
  <priority>0.8</priority>
</url>

According to its own documentation, Google does not evaluate changefreq and priority, and lastmod only if the values are reliable. The module writes the fields anyway because the sitemap protocol provides them.

Defaults per type

Type changefreq priority
Products weekly 0.8
Categories weekly 0.7
CMS pages monthly 0.5
Manufacturers monthly 0.6
Static URLs value of the entry, otherwise monthly value of the entry, otherwise 0.5

Flow

graph TD
    A["GenerateSitemapCommand"] --> B["Read settings and languages"]
    B --> C["GenerateSitemapService"]
    C --> D["Query service per type"]
    D --> E["HreflangService (optional)"]
    E --> F["UrlBuilderService"]
    D --> F
    F --> G["XmlWriterService"]
    G --> H["FileWriterService"]
    H --> I["sitemap-type.xml"]
    I --> J["Sitemap index sitemap.xml"]

The module works without a cache, without compression (.xml.gz), without pinging search engines and without a scheduler of its own. Every generation reads the data from the database again and overwrites the files.

Classes

Class Task
Command\GenerateSitemapCommand Console command mmd:sitemap:generate, options, language and type selection, output
Service\Command\GenerateSitemapService Orchestrates query, hreflang, URL building, XML and writing, creates the index
Service\Query\ProductQueryService, CategoryQueryService, CmsPageQueryService, ManufacturerQueryService Read the content with SQL against oxarticles, oxcategories, oxcontents, oxmanufacturers and oxseo
Service\Query\StaticUrlQueryService Reads the table mmd_sitemap_static_urls
Service\Domain\HreflangService Determines alternate language URLs from oxseo
Service\Domain\UrlBuilderService Builds the URL with lastmod, changefreq, priority per record
Service\Domain\XmlWriterService Creates sitemap and index XML with DOMDocument
Service\Domain\FileWriterService Writes files, creates directories, deletes with --clear
Service\Bridge\OxidConfigReader, OxidSettingsBridge Read the module settings as well as shop URL, languages and language URLs
Core\Events Activation and deactivation
Controller\Admin\* Admin overview and management of static URLs

Multi-language behaviour

Database

The module creates only the table mmd_sitemap_static_urls (columns see Static URLs). All other data is read from the OXID tables without modifying them. It uses the shop's database connection as a PDO object.

Lifecycle

Event Effect
Activation (onActivate) Creates source/export/sitemap and the table mmd_sitemap_static_urls if they do not exist
Deactivation (onDeactivate) No action, files and data are kept

There are no migrations. oe:module:apply-configuration only applies the module settings, not the table.

Limits

Module structure

mmd/sitemap/                       # source/modules/mmd/sitemap
β”œβ”€β”€ metadata.php                   # module ID mmd_sitemap, settings, events
β”œβ”€β”€ services.yaml                  # services and console command
β”œβ”€β”€ menu.xml                       # admin menu "Sitemap"
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Command/                   # GenerateSitemapCommand
β”‚   β”œβ”€β”€ Controller/Admin/          # overview, static URLs
β”‚   β”œβ”€β”€ Core/Events.php            # activation/deactivation
β”‚   β”œβ”€β”€ DTO/, Enum/, Model/        # value objects, types, StaticUrl model
β”‚   └── Service/                   # Bridge, Query, Domain, Command
└── views/                         # admin templates and translations