Shopware icon

Shopware

Shopware

Actions778

Theme → Create Theme

AI-generated

Overview

This node operation allows users to create a new Theme resource in the Shopware system. It is useful for scenarios where users want to programmatically add themes with detailed configurations, including metadata, media, sales channels, and dependencies. For example, a user can create a custom theme with specific labels, descriptions, and media assets, and activate it for use in their Shopware storefront.

Use Case Examples

  1. Creating a new theme with a unique ID, name, author, and description.
  2. Adding media and preview media to the theme for visual representation.
  3. Setting sales channels and dependent themes to control where the theme is applied.

Properties

Name Meaning
Response Data format for response, either basic or detailed information about the created theme.
Id Unique identifier for the theme (required).
Technical Name Technical name of the theme for internal use.
Name Display name of the theme (required).
Author Author of the theme (required).
Description Description of the theme.
Labels JSON object containing labels for the theme.
Help Texts JSON object containing help texts related to the theme.
Custom Fields JSON object for custom fields associated with the theme.
Preview Media Id Identifier for the preview media asset.
Parent Theme Id Identifier for the parent theme if this theme inherits from another.
Theme Json JSON object representing the theme's configuration.
Base Config JSON object for the base configuration of the theme.
Config Values JSON object for configuration values of the theme.
Active Boolean flag indicating if the theme is active (required).
Created At Timestamp string for when the theme was created.
Updated At Timestamp string for when the theme was last updated.
Translated JSON object containing translated fields for the theme.
Sales Channels JSON array defining sales channels associated with the theme.
Media JSON array containing media assets related to the theme.
Preview Media JSON object for preview media details, added since version 6.0.0.0.
Dependent Themes JSON array of themes that depend on this theme.

Output

JSON

  • id - Unique identifier of the created theme.
  • name - Name of the created theme.
  • author - Author of the created theme.
  • description - Description of the created theme.
  • active - Indicates if the theme is active.
  • createdAt - Creation timestamp of the theme.
  • updatedAt - Last update timestamp of the theme.
  • labels - Labels associated with the theme.
  • helpTexts - Help texts related to the theme.
  • customFields - Custom fields of the theme.
  • previewMediaId - ID of the preview media asset.
  • parentThemeId - ID of the parent theme.
  • themeJson - Theme configuration JSON.
  • baseConfig - Base configuration JSON.
  • configValues - Configuration values JSON.
  • translated - Translated fields JSON.
  • salesChannels - Sales channels associated with the theme.
  • media - Media assets related to the theme.
  • previewMedia - Preview media details.
  • dependentThemes - Themes dependent on this theme.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure all required fields (Id, Name, Author, Active) are provided to avoid validation errors.
  • Verify JSON fields (Labels, Help Texts, Custom Fields, Theme Json, Base Config, Config Values, Translated, Sales Channels, Media, Preview Media, Dependent Themes) are correctly formatted to prevent parsing errors.
  • Check API credentials and base URL configuration to ensure successful connection to Shopware Admin API.
  • If SSL issues occur, consider enabling the 'Ignore SSL Issues' option or verify the SSL certificate validity.

Discussion