# 1. Plugin-Ordner erstellen und Dateien hochladen
mkdir -p custom/plugins/WSC_SWDomainSwitcher
# 2. Plugin installieren
php bin/console plugin:refresh
php bin/console plugin:install --activate WSCSWDomainSwitcher
php bin/console cache:clear{# Header Dropdown #}
{% sw_include '@WSCSWDomainSwitcher/storefront/component/domain-switcher.html.twig' %}
{# Footer Flaggen #}
{% sw_include '@WSCSWDomainSwitcher/storefront/component/domain-switcher-inline.html.twig' %}{# Einfacher Dropdown #}
{{ wsc_domain_switcher() }}
{# Nur Flaggen #}
{{ wsc_domain_flags() }}
{# Custom Dropdown #}
{{ wsc_domain_dropdown({
'button_text': '🗺️ Sprache wählen',
'button_class': 'btn btn-primary'
}) }}
{# Custom Flaggen #}
{{ wsc_domain_flags({
'show_label': false,
'flag_class': 'btn btn-sm btn-light me-1',
'container_class': 'd-flex justify-content-center'
}) }}Header:
{# templates/storefront/layout/header/header.html.twig #}
{% block layout_header_actions %}
{{ parent() }}
{{ wsc_domain_switcher() }}
{% endblock %}Footer:
{# templates/storefront/layout/footer/footer.html.twig #}
{% block layout_footer_inner %}
{{ wsc_domain_flags({'show_label': false}) }}
{{ parent() }}
{% endblock %}Top-Bar:
{# Irgendwo in deinem Layout #}
<div class="top-bar">
<div class="container d-flex justify-content-between">
<div>Kostenloser Versand ab 50€</div>
<div>{{ wsc_domain_flags({'show_label': false}) }}</div>
</div>
</div>https://deine-domain.com/api/wsc-domain-switch/debug?path=/impressum&domain=andere-domain.com
.wsc-domain-switcher {
.dropdown-toggle {
border: 1px solid #dee2e6;
&:hover {
background-color: #f8f9fa;
}
}
.dropdown-menu {
min-width: 200px;
}
.wsc-domain-switch-link {
&:hover {
background-color: #f8f9fa;
}
}
}
.wsc-domain-switcher-inline {
.wsc-domain-switch-flag {
width: 40px;
height: 32px;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 1.2em;
text-decoration: none;
&:hover {
background-color: rgba(255, 255, 255, 0.1);
transform: scale(1.1);
transition: all 0.2s ease;
}
}
}✅ Sales Channel basiert - Keine doppelte Datenpflege
✅ SEO-URL Mapping - Automatische URL-Übersetzung
✅ Shortcode-System - Einfache Template-Integration
✅ Debug-Funktion - URL-Mapping testen
✅ Responsive Design - Bootstrap kompatibel
✅ Mehrsprachig - Automatische Sprach-/Ländererkennung
Du musst nur noch:
- Die Ordnerstruktur erstellen
- Die Dateien hochladen
- Plugin installieren
- Shortcodes in Templates einbauen
Fertig! 🎯