Gibt es in SW6 keine Möglichkeit die Registrierung je Verkaufskanal nur für gewerbliche Kunden vorzubelgen? Quasi die Logik wenn ich bei “Ich bin*” Gewerblich auswähle. Also die Felder Unternehmen, Abteilung, Ust-Id anzeigen? Es soll kein Auswahlfeld geben. In der Konfiguration zur Registrierung sehe ich leider keine Option. Im Template auch nicht… Gibt es vielleicht noch einen anderen Weg ohne Templatenanpassung?
Es ist ein Zusammenspiel mehrer Faktoren notwendig um die Funktion bereitzustellen (scss, js und Templateanpassungen). Wir haben die Logik in ein Pluign gepackt und werden prüfen ob wir dies im Store bereitstellen können.
Es ist ein Zusammenspiel mehrer Faktoren notwendig um die Funktion bereitzustellen (scss, js und Templateanpassungen). Wir haben die Logik in ein Pluign gepackt und werden prüfen ob wir dies im Store bereitstellen können.
Hallo, oh das klingt super. Eine Frage vorab, kann man das dann pro Verkaufskanal zuweisen? Ich hab nämlich zwei Verkaufskanäle, einer ist B2C und einer B2B. Und ich würde das eben für B2B brauchen.
entweder das Plugin nehmen oder einfach ein neues Template Override in /custom/plugins//src/Resources/views/storefront/component/address/address-personal.html.twig mit folgenden Inhalt setzen:
{% sw_extends '@Storefront/storefront/component/address/address-personal.html.twig' %}
{% block component_address_personal_account_type_select %}
{% if shopware.config.core.loginRegistration.showAccountTypeSelection %}
<select name="{% if prefix %}{{ prefix }}[accountType]{% else %}accountType{% endif %}"
id="{{ prefix }}accountType"
required="required"
class="custom-select contact-select"
data-form-field-toggle="true"
data-form-field-toggle-target=".js-field-toggle-contact-type-company"
data-form-field-toggle-value="{{ constant('Shopware\\Core\\Checkout\\Customer\\CustomerEntity::ACCOUNT_TYPE_BUSINESS') }}"
data-form-field-toggle-scope="{% if scope == 'parent' %}parent{% else %}all{% endif %}"
{% if scope == 'parent' %}data-form-field-toggle-parent-selector={{ parentSelector }}{% endif %}
>
{% endif %}
{% set isCompany = false %}
{% if page.address.company or data.company is not empty %}
{% set isCompany = true %}
{% endif %}
{% if accountType and accountType == constant('Shopware\\Core\\Checkout\\Customer\\CustomerEntity::ACCOUNT_TYPE_BUSINESS') %}
{% set isCompany = true %}
{% endif %}
{% set isLoginPage = false %}
{% if activeRoute == 'frontend.account.login.page' %}
{% set isLoginPage = true %}
{% endif %}
<option value="{{ constant('Shopware\\Core\\Checkout\\Customer\\CustomerEntity::ACCOUNT_TYPE_BUSINESS') }}"
{% if isLoginPage == false %} selected="selected"{% endif %} aria-hidden="true">
{{ "account.personalTypeBusiness"|trans|sw_sanitize }}
</option>
</select>
{% endblock %}
Ist dirty, funktioniert aber und lässt alle Funktionen vorhanden.
Alternativ den Block noch unsichtbar machen. SCSS: