Shopware 6 Storefront Icons

Shopware 6 bietet eine Vielzahl an SVG-Icons, die direkt in der Storefront verwendet werden können – beispielsweise für Navigation, Warenkorb oder Benutzerkonto. Die Icons sind in die beiden Sets default und solid unterteilt.

Die SVG-Dateien findest du im Shopware-Installationsverzeichnis unter folgenden Ordnerpfaden:
- vendor/shopware/storefront/Resources/app/storefront/dist/assets/icon/
 

Shopware 6 Storefront Icons

  • 3d-placeholder
  • address
  • alert
  • align-center
  • align-justify
  • align-left
  • align-right
  • arrow-360-left
  • arrow-360-right
  • arrow-circle-down
  • arrow-circle-left
  • arrow-circle-right
  • arrow-circle-up
  • arrow-down
  • arrow-head-down
  • arrow-head-left
  • arrow-head-right
  • arrow-head-up
  • arrow-left
  • arrow-move-horizontal-axis
  • arrow-move-vertical-axis
  • arrow-right
  • arrow-scroll
  • arrow-simple-long-right
  • arrow-switch
  • arrow-turn-left
  • arrow-turn-right
  • arrow-up
  • arrow-up-down
  • augmented
  • avatar
  • avatar-multiple
  • bag
  • bag-product
  • basket
  • beer
  • bell-bell
  • bell-crossed
  • blocked
  • bold
  • bookmark
  • books
  • briefcase
  • browser
  • bug
  • bulk-edit
  • calendar
  • calendar-empty
  • cart
  • chart
  • chart-bar
  • chart-bar-filled
  • chart-pie
  • chart-sales
  • checkmark
  • checkmark-block
  • checkmark-circle
  • checkmark-wide
  • checkmark-wide-block
  • circle
  • circle-download
  • circle-upload
  • clock
  • cloud-download
  • cloud-upload
  • cockpit
  • code
  • colorpicker
  • content
  • cube-3d-shade
  • dashboard
  • database
  • debug
  • desktop
  • document-view
  • drag-horizontal
  • drag-vertical
  • duplicate
  • editor-align-left
  • editor-align-right
  • editor-bold
  • editor-code
  • editor-expand
  • editor-italic
  • editor-link
  • editor-list
  • editor-list-numberd
  • editor-list-unordered
  • editor-media
  • editor-re-undo
  • editor-redo
  • editor-shrink
  • editor-strikethrough
  • editor-style
  • editor-subscript
  • editor-superscript
  • editor-table
  • editor-underline
  • editor-undo
  • emoji
  • envelope
  • error
  • euro
  • external
  • eye-crossed
  • eye-open
  • file
  • filter
  • flag
  • floor-ar-splash
  • folder-thumbnail
  • forward
  • gamecontroler
  • globe
  • gps
  • grab
  • graduate-cap
  • handtouch
  • harddisk
  • headset
  • heart
  • heart-fill
  • help
  • history
  • home
  • hourglass
  • image
  • inbox
  • infinity
  • info
  • italic
  • keyboard
  • lab-flask
  • laptop
  • layers
  • layout
  • lightbulb
  • link
  • list
  • loading-circle
  • loading-star
  • lock-closed
  • lock-fingerprint
  • lock-key
  • lock-open
  • log-in
  • log-out
  • map
  • map-closed
  • map-open
  • marker
  • marketing
  • medal
  • micophone
  • minus
  • minus-block
  • minus-circle
  • minus-wide
  • mobile
  • money-card
  • money-cash
  • money-wallet
  • moon
  • more-horizontal
  • more-vertical
  • move-file
  • package-closed
  • package-gift
  • package-open
  • paint
  • paper-pencil
  • paper-pencil-signed
  • paperclip
  • paperplane
  • pause
  • pawn
  • pencil-brush
  • phone
  • photocamera
  • placeholder
  • plastic-bag
  • play
  • plug
  • plus
  • plus-block
  • plus-circle
  • plus-wide
  • preview
  • printer
  • products
  • pulse
  • pushpin
  • puzzle-piece
  • quickjump
  • quote
  • replace
  • reply
  • rocket
  • rule
  • ruler-pencil
  • save
  • screen-full
  • screen-minimize
  • search
  • server
  • settings
  • share
  • shield
  • shop
  • shopware
  • sidebar-close
  • sidebar-open
  • sliders
  • sliders-horizontal
  • sofa
  • sort-down
  • sort-up
  • sparkles
  • speech-bubble
  • speech-bubbles
  • square
  • stack
  • stack-block
  • stack-circle
  • star
  • star-half
  • sun
  • surface
  • tablet
  • tags
  • target-big
  • target-with-block
  • terminal
  • text-table
  • thumb-down
  • thumb-up
  • tools
  • traffic-pawn
  • trash
  • tray-down
  • tray-up
  • triangle
  • trophy
  • truck
  • underline
  • variants
  • video-camera
  • view-compact
  • view-grid
  • view-normal
  • view-split
  • warning
  • x
  • x-block
  • x-circle
  • x-wide

Shopware Icons in Twig-Templates einbinden

Shopware Icons können direkt in Twig-Templates eingebunden werden. Dafür verwendest du das sw_icon-Tag und gibst den Namen des gewünschten Icons an.

Icon aus dem Default-Set einbinden

{% sw_icon 'cart' %}

 

Icon aus dem Solid-Set einbinden

{% sw_icon 'cart' style { 'pack': 'solid' } %}

Shopware Icons in Erlebniswelten verwenden

Shopware Icons können auch in Erlebniswelten eingebunden werden. Da die Icon-Dateien nicht unter einem festen öffentlichen Pfad liegen, lädst du das gewünschte Icon am besten zuerst in die Medienverwaltung hoch.

So funktioniert's:

  1. Kopiere die gewünschte SVG-Datei aus vendor/shopware/storefront/Resources/app/storefront/dist/assets/icon/ und lade sie in der Medienverwaltung hoch.
  2. Kopiere in der Medienverwaltung die URL des Icons über „Link kopieren“.
  3. Erstelle ein <img>-Tag und hinterlege im src-Attribut den Pfad zum gewünschten Icon.
  4. Passe bei Bedarf die Größe und Position des Icons über CSS an.

Icon in einer Twig-Variable speichern

Wenn du ein Icon innerhalb eines Templates mehrfach verwenden möchtest, kannst du dessen Ausgabe zunächst in einer Variable speichern.

{% block content %}
    {% set icon %}
        {% sw_icon 'sales' %}
    {% endset %}
    <div class="my-icon">{{ icon }}</div>
{% endblock %}

 

Die Variable icon kann anschließend an weiteren Stellen im Template ausgegeben werden.