{"id":6792,"date":"2021-03-07T11:56:46","date_gmt":"2021-03-07T11:56:46","guid":{"rendered":"https:\/\/www.bay20.com\/?p=6792"},"modified":"2025-05-21T17:14:27","modified_gmt":"2025-05-21T11:29:27","slug":"so-erstellen-sie-ein-snippet-in-shopware-5","status":"publish","type":"post","link":"https:\/\/www.bay20.com\/de\/so-erstellen-sie-ein-snippet-in-shopware-5\/","title":{"rendered":"Wie erstellt man ein Snippet in Shopware 5?"},"content":{"rendered":"\n<p><strong>Um ein Snippet in <a href=\"https:\/\/www.bay20.com\/de\/mieten-shopware-entwickler\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Shopware 5<\/strong><\/a> zu erstellen, gehen Sie wie folgt vor:<\/strong><\/p>\n\n\n\n<p><strong>Schritt 1:<\/strong> Melden Sie sich in der Verwaltungskonsole an und gehen Sie zu <strong>Konfiguration &gt; Snippets.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"319\" src=\"https:\/\/www.bay20.com\/wp-content\/uploads\/2020\/11\/Screenshot_2-980x319.png\" alt=\"\" class=\"wp-image-6799\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Screenshot_2-980x319.png 980w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Screenshot_2-300x98.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Screenshot_2-800x260.png 800w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Screenshot_2-768x250.png 768w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Screenshot_2-805x262.png 805w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Screenshot_2.png 1365w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><\/figure>\n\n\n\n<p><strong>Schritt 2:<\/strong> Klicken Sie auf die Schaltfl\u00e4che <strong>Snippet hinzuf\u00fcgen.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"521\" src=\"https:\/\/www.bay20.com\/wp-content\/uploads\/2020\/11\/Snippet_2-980x521.png\" alt=\"\" class=\"wp-image-6811\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Snippet_2-980x521.png 980w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Snippet_2-300x159.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Snippet_2-800x425.png 800w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Snippet_2-768x408.png 768w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Snippet_2-805x428.png 805w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2020\/11\/Snippet_2.png 995w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><\/figure>\n\n\n\n<p><strong><strong>Schritt 3: <\/strong><\/strong>F\u00fcllen Sie die folgenden Felder aus:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Namespace:<\/strong> frontend\/index\/test<\/li><li><strong>Name: <\/strong>sTestSnippet<\/li><li><strong>Wert:<\/strong> Dieser Wert wird im Frontend angezeigt, wo Sie ihn aufrufen.<\/li><\/ul>\n\n\n\n<p><strong>Schritt 4: <\/strong>Aufrufen des Snippets in der .tpl-Datei mit diesem Code.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{s namespace=\"frontend\/index\/test\" name=\"sTestSnippet\"}{\/s}\n<\/code><\/pre>\n\n\n\n<p><strong>Schritt 5: <\/strong>L\u00f6schen Sie anschlie\u00dfend den Cache und aktualisieren Sie das Frontend, um die \u00c4nderungen zu sehen.<\/p>\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 <strong><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><\/strong> an, wenn Sie Unterst\u00fctzung f\u00fcr Shopware 5 ben\u00f6tigen. Sie k\u00f6nnen auch die <strong><a href=\"https:\/\/www.bay20.com\/de\/shopware-entwicklungsunternehmen\/\">Shopware 5 <strong>Entwicklungsseite<\/strong><\/a><\/strong> besuchen, um die von uns angebotenen Dienstleistungen zu \u00fcberpr\u00fcfen.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Um ein Snippet in Shopware 5 zu erstellen, gehen Sie wie folgt vor: Schritt 1: Melden Sie sich in der Verwaltungskonsole an und gehen Sie zu Konfiguration &gt; Snippets. Schritt 2: Klicken Sie auf die Schaltfl\u00e4che Snippet hinzuf\u00fcgen. Schritt 3: F\u00fcllen Sie die folgenden Felder aus: Namespace: frontend\/index\/test Name: sTestSnippet Wert: Dieser Wert wird im [&hellip;]<\/p>\n","protected":false},"author":30,"featured_media":7251,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78,116],"tags":[],"class_list":["post-6792","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\/6792","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\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/comments?post=6792"}],"version-history":[{"count":19,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/6792\/revisions"}],"predecessor-version":[{"id":17324,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/6792\/revisions\/17324"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media\/7251"}],"wp:attachment":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media?parent=6792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/categories?post=6792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/tags?post=6792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}