{"id":9120,"date":"2021-09-28T07:35:45","date_gmt":"2021-09-28T07:35:45","guid":{"rendered":"https:\/\/www.bay20.com\/?p=9120"},"modified":"2025-05-21T16:10:06","modified_gmt":"2025-05-21T10:25:06","slug":"wie-erstelle-ich-ein-element-badge-in-shopware-5","status":"publish","type":"post","link":"https:\/\/www.bay20.com\/de\/wie-erstelle-ich-ein-element-badge-in-shopware-5\/","title":{"rendered":"Wie kann ich in Shopware 5 ein Artikelabzeichen erstellen?"},"content":{"rendered":"\n<p>Um ein Artikelabzeichen in <a href=\"https:\/\/www.bay20.com\/de\/shopware-entwicklungsunternehmen\/\" target=\"_blank\" rel=\"noreferrer noopener\">shopware 5<\/a> zu erstellen, gehen Sie wie folgt vor:<\/p>\n\n\n\n<p><strong>Schritt 1: <\/strong>Erstellen Sie ein neues Freitextfeld im Backend, um die neuen Abzeichen f\u00fcr jeden Artikel auszuw\u00e4hlen. Gehen Sie zu <strong>Konfiguration&gt;Freies Textfeld<\/strong>, um ein neues Textfeld zu erstellen.<\/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\/07\/Screenshot_1-8-980x449.png\" alt=\"\" class=\"wp-image-9122\" width=\"663\" height=\"303\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_1-8-980x449.png 980w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_1-8-300x137.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_1-8-800x366.png 800w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_1-8-768x352.png 768w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_1-8-1000x458.png 1000w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_1-8.png 1365w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/figure>\n\n\n\n<p><strong>Schritt 2:<\/strong> Klicken Sie auf <strong>\u201eElement hinzuf\u00fcgen\u201c<\/strong>, um ein neues Element zu erstellen, und vergewissern Sie sich, dass der Tabellenname f\u00fcr Artikel <strong>\u201eElement(s_articles_attributes)\u201c<\/strong> ausgew\u00e4hlt ist.<\/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\/07\/Screenshot_2-10.png\" alt=\"\" class=\"wp-image-9123\" width=\"605\" height=\"501\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_2-10.png 564w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_2-10-300x248.png 300w\" sizes=\"auto, (max-width: 605px) 100vw, 605px\" \/><\/figure>\n\n\n\n<p><strong>Schritt 3: <\/strong>F\u00fcllen Sie die erforderlichen Felder der <strong>Datenbankkonfiguration<\/strong> und der <strong>Ansichtskonfiguration <\/strong>aus.<\/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\/07\/Screenshot_3-7.png\" alt=\"\" class=\"wp-image-9124\" width=\"622\" height=\"447\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_3-7.png 602w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_3-7-300x216.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-left\"><strong><strong>Datenbankkonfiguration<\/strong><\/strong><\/p>\n\n\n\n<p><strong>Spaltenname: <\/strong>Benennen Sie die Spalte wie z. B. <strong>badge_freeshipping<\/strong><\/p>\n\n\n\n<p><strong>Spaltentyp: &#8211;<\/strong> W\u00e4hlen Sie unter Spaltentyp das <strong>Kontrollk\u00e4stchen &#8211; INT(1)<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-left\"><strong>Konfiguration anzeigen<\/strong><\/p>\n\n\n\n<p><strong>Bezeichnung:<\/strong> Benennen Sie die Beschriftung, die in <strong>\u00dcbersichtselementen<\/strong> angezeigt werden kann.<\/p>\n\n\n\n<p><strong>Unterst\u00fctzungstext:<\/strong> Dies ist ein optionales Feld. Es wird unter dem <strong>Kontrollk\u00e4stchen<\/strong> in den <strong>\u00dcbersichtselementen<\/strong> angezeigt.<\/p>\n\n\n\n<p><strong>Anzeige im Backend: <\/strong>Wenn Sie dies aktivieren, wird es im Backend angezeigt.<\/p>\n\n\n\n<p><strong>Hinweis:- Speichern Sie den Vorgang und l\u00f6schen Sie den Cache.<\/strong><\/p>\n\n\n\n<p><strong>Schritt 4: <\/strong>Rufen Sie das Shopware-Themenverzeichnis Ihrer Website auf.<\/p>\n\n\n\n<p><strong>Schritt 5: <\/strong>Erstellen Sie das neue Unterverzeichnis mit dem Namen<strong> product-badges.tpl<\/strong><\/p>\n\n\n\n<p><strong>Dateistruktur:-<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>themes\/Frontend\/Custom\/frontend\/listing\/product-box\/product-badges.tpl\n<\/code><\/pre>\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\/07\/Screenshot_4-7.png\" alt=\"\" class=\"wp-image-9125\" width=\"347\" height=\"580\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_4-7.png 330w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_4-7-300x502.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_4-7-179x300.png 179w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/figure>\n\n\n\n<p><strong>Hinweis: <\/strong>Das <strong>benutzerdefinierte<\/strong> Verzeichnis ist ein Thema, das ich bereits erstellt habe.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.bay20.com\/wp-content\/uploads\/2021\/05\/Screenshot_6-980x449.png\" alt=\"\" class=\"wp-image-8493\" width=\"701\" height=\"320\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_6-980x449.png 980w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_6-300x137.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_6-800x366.png 800w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_6-768x352.png 768w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_6-1000x458.png 1000w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/05\/Screenshot_6.png 1365w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><\/figure>\n\n\n\n<p><strong>Schritt 6: <\/strong>F\u00fcgen Sie diesen Code in<strong> product-badges.tpl <\/strong>ein<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{extends file=\"parent:frontend\/listing\/product-box\/product-badges.tpl\"}\n\n{block name='frontend_listing_box_article_esd'}\n  {$smarty.block.parent}\n    {if $sArticle.badge_freeshipping}\n      &lt;div class=\"product--badge badge--free-shipping\"&gt;{s namespace='frontend\/listing\/box_article' name=\"ListingBoxShippingCosts\"}Free shipping{\/s}&lt;\/div&gt;\n  {\/if}\n{\/block}<\/code><\/pre>\n\n\n\n<p><strong>Schritt 7: <\/strong>Erstellen Sie eine neue Datei namens<strong> product-box.less <\/strong>im Verzeichnis<strong> _modules.<\/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\/07\/Screenshot_5-7.png\" alt=\"\" class=\"wp-image-9126\" width=\"306\" height=\"497\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_5-7.png 303w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_5-7-300x487.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_5-7-185x300.png 185w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/figure>\n\n\n\n<p><strong>Schritt 8: <\/strong>F\u00fcgen Sie diesen Code in die Datei<strong> product-box.less <\/strong>ein.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.product--box\n\t.product--badges {\n\t\t.badge--free-shipping {\n\t\t\tcolor: #FFFFFF;\n\t\t\tbackground: #000000;\n\t}\n}<\/code><\/pre>\n\n\n\n<p><strong>Schritt 9: <\/strong>Erstellen Sie die Datei <strong>all.less<\/strong> im Verzeichnis <strong>less<\/strong>. Und importieren Sie die <strong>Produkt-Box<\/strong> in sie.<\/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\/07\/Screenshot_6-4.png\" alt=\"\" class=\"wp-image-9127\" width=\"323\" height=\"494\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_6-4.png 291w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_6-4-196x300.png 196w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/figure>\n\n\n\n<p><strong>Schritt 10: <\/strong>F\u00fcgen Sie diesen Code in die Datei<strong> all.less <\/strong>ein.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@import \"_modules\/product-box\";<\/code><\/pre>\n\n\n\n<p><strong>Hinweis:<\/strong> Speichern Sie diesen Vorgang und aktivieren Sie das Kontrollk\u00e4stchen, das wir f\u00fcr jedes Element erstellt haben.<\/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\/07\/Screenshot_7-4-980x72.png\" alt=\"\" class=\"wp-image-9128\" width=\"630\" height=\"46\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_7-4-980x72.png 980w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_7-4-300x22.png 300w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_7-4-800x59.png 800w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_7-4-768x56.png 768w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_7-4-1000x73.png 1000w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_7-4.png 1065w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p><strong>Ergebnisse:<\/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\/07\/Screenshot_8-4.png\" alt=\"\" class=\"wp-image-9129\" width=\"611\" height=\"546\" srcset=\"https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_8-4.png 587w, https:\/\/www.bay20.com\/de\/wp-content\/uploads\/2021\/07\/Screenshot_8-4-300x268.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/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 <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 Artikelabzeichen in shopware 5 zu erstellen, gehen Sie wie folgt vor: Schritt 1: Erstellen Sie ein neues Freitextfeld im Backend, um die neuen Abzeichen f\u00fcr jeden Artikel auszuw\u00e4hlen. Gehen Sie zu Konfiguration&gt;Freies Textfeld, um ein neues Textfeld zu erstellen. Schritt 2: Klicken Sie auf \u201eElement hinzuf\u00fcgen\u201c, um ein neues Element zu erstellen, und [&hellip;]<\/p>\n","protected":false},"author":74,"featured_media":9121,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78,116],"tags":[],"class_list":["post-9120","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\/9120","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=9120"}],"version-history":[{"count":10,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/9120\/revisions"}],"predecessor-version":[{"id":17274,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/posts\/9120\/revisions\/17274"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media\/9121"}],"wp:attachment":[{"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/media?parent=9120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/categories?post=9120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bay20.com\/de\/wp-json\/wp\/v2\/tags?post=9120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}