{"id":8495,"date":"2021-06-25T04:34:51","date_gmt":"2021-06-25T04:34:51","guid":{"rendered":"https:\/\/www.bay20.com\/?p=8495"},"modified":"2025-05-21T16:14:05","modified_gmt":"2025-05-21T10:29:05","slug":"anleitung-zum-erstellen-von-konfigurationssatzen-in-shopware-5","status":"publish","type":"post","link":"https:\/\/www.bay20.com\/de\/anleitung-zum-erstellen-von-konfigurationssatzen-in-shopware-5\/","title":{"rendered":"Wie kann man in Shopware 5 Konfigurationss\u00e4tze erstellen?"},"content":{"rendered":"\n<p>Um Konfigurationss\u00e4tze in Shopware 5 zu erstellen, f\u00fchren Sie die folgenden Schritte aus:<\/p>\n\n\n\n<p><strong>Schritt 1: <\/strong>Gehen Sie zum Shopware-Themenverzeichnis Ihrer Website.<\/p>\n\n\n\n<p><strong>Schritt 2: <\/strong>\u00d6ffnen Sie die Datei <strong>Theme.php<\/strong>, um den Konfigurationssatz hinzuzuf\u00fcgen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bay20.com\/wp-content\/uploads\/2021\/05\/Screenshot_1-1.png\" alt=\"\" class=\"wp-image-8496\" width=\"441\" height=\"599\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_1-1.png 332w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_1-1-300x408.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_1-1-221x300.png 221w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/figure>\n\n\n\n<p><strong>Schritt 3: <\/strong>F\u00fcgen Sie den folgenden Code in die <strong>Theme.php<\/strong> ein<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">use Doctrine\\Common\\Collections\\ArrayCollection<strong>;<\/strong>\nuse Shopware\\Components\\Theme\\ConfigSet<strong>;<\/strong><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">public function createConfigSets(ArrayCollection $collection)\n{\n   $set = new ConfigSet()<strong>;\n   <\/strong>$set-&gt;setName('Red theme')<strong>;\n   <\/strong>$set-&gt;setDescription('Set all colors to red and increase the font size')<strong>;\n   <\/strong>$set-&gt;setValues(array(\n       'basic_font_size' =&gt; '20px'<strong>,\n       <\/strong>'custom-color-main' =&gt; '#ff0000'\n   ))<strong>;\n\n   <\/strong>$collection-&gt;add($set)<strong>;\n<\/strong>}\n\n<\/pre>\n\n\n\n<p><strong>Schritt 4: <\/strong>Gehen Sie nun zum Abschnitt Theme-Manager im Backend und klicken Sie auf<strong> Theme konfigurieren.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bay20.com\/wp-content\/uploads\/2021\/05\/Screenshot_2-1-980x450.png\" alt=\"\" class=\"wp-image-8498\" width=\"847\" height=\"389\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_2-1-980x450.png 980w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_2-1-300x138.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_2-1-800x367.png 800w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_2-1-768x353.png 768w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_2-1-1000x459.png 1000w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_2-1.png 1365w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/figure>\n\n\n\n<p><strong>Schritt 5: <\/strong>Nachdem Sie auf das <strong>Thema Konfigurieren<\/strong> geklickt haben, klicken Sie auf die <strong>Konfigurationss\u00e4tze<\/strong>, um das Ergebnis zu sehen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bay20.com\/wp-content\/uploads\/2021\/05\/Screenshot_3-1-980x449.png\" alt=\"\" class=\"wp-image-8499\" width=\"865\" height=\"396\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_3-1-980x449.png 980w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_3-1-300x138.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_3-1-800x367.png 800w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_3-1-768x352.png 768w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_3-1-1000x459.png 1000w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_3-1.png 1365w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p><strong>Ergebnis:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bay20.com\/wp-content\/uploads\/2021\/05\/Screenshot_4-1-980x450.png\" alt=\"\" class=\"wp-image-8500\" width=\"881\" height=\"405\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_4-1-980x450.png 980w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_4-1-300x138.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_4-1-800x367.png 800w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_4-1-768x353.png 768w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_4-1-1000x459.png 1000w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_4-1.png 1365w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/figure>\n\n\n\n<p><strong>Bitte kontaktieren Sie uns unter <strong><a href=\"mailto:manish@bay20.com\">manish@bay20.com<\/a><\/strong> oder rufen Sie uns unter <a href=\"https:\/\/api.whatsapp.com\/send?phone=+918800519180&amp;text=Hi,%20I%20contacted%20you%20through%20your%20website.\" target=\"_blank\" rel=\"noreferrer noopener\">+91-8800519180<\/a> an, wenn Sie Unterst\u00fctzung zu Shopware 5 und Shopware 6 ben\u00f6tigen. Sie k\u00f6nnen auch die <strong><a href=\"https:\/\/www.bay20.com\/de\/shopware-entwicklungsunternehmen\/\">Shopware<strong>-Entwicklungsseite<\/strong><\/a><\/strong> besuchen, um die von uns angebotenen Dienstleistungen zu pr\u00fcfen.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Um Konfigurationss\u00e4tze in Shopware 5 zu erstellen, f\u00fchren Sie die folgenden Schritte aus: Schritt 1: Gehen Sie zum Shopware-Themenverzeichnis Ihrer Website. Schritt 2: \u00d6ffnen Sie die Datei Theme.php, um den Konfigurationssatz hinzuzuf\u00fcgen. Schritt 3: F\u00fcgen Sie den folgenden Code in die Theme.php ein use Doctrine\\Common\\Collections\\ArrayCollection; use Shopware\\Components\\Theme\\ConfigSet; public function createConfigSets(ArrayCollection $collection) { $set = new [&hellip;]<\/p>\n","protected":false},"author":74,"featured_media":8503,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78,116],"tags":[],"class_list":["post-8495","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-shopware","category-shopware-5"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/8495","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/users\/74"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/comments?post=8495"}],"version-history":[{"count":8,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/8495\/revisions"}],"predecessor-version":[{"id":17279,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/8495\/revisions\/17279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media\/8503"}],"wp:attachment":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media?parent=8495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/categories?post=8495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/tags?post=8495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}