Shopware 6: Application
Log in to the front end of your Shopware store.
Account
The default checkbox "Subscribe to newsletter" is overwritten by ###system_name##. The name can be changed independently via text blocks.
Resources/views/storefront/page/account/index.html.twig
{% block page_account_overview_newsletter %}
Export by console
The command "mailingwork:export" transfers all customers to ###system_name##, optionally only customers with a valid opt-in. This starts an import in Shared Services - Graubünden Ferien, which you can view under "Subscribers ⭢ Import".
Parameter
- --forceOptin with the options "true" or "false" defines whether all or only customers with a valid opt-in are transferred
- --salesChannel specifying the "salesChannelID" limits the transfer to the desired salesChannel (recommended)
Example
- ./bin/console mailingwork:export --salesChannel 3ec263d2cfd845e78c27123a919f53f7 --forceOptin true
Multi language
In case of opt-in and opt-out forms, there is no reference to the customer yet, as the customer is not yet registered. Here, the SalesChannel and the active language are used. Since content can be stored language-dependent, please create a opt-in form in Shopware and an opt-in setup in Shared Services - Graubünden Ferien for each language. Assign the language as a hidden field in each setup. Alternatively, you can also have Shopware transfer the language as a hidden field via the {% block element_mwform_subscribe_form_inner %} block. You can use this value to select the language after the subscriber has logged in. In the customer account and customer export the language of the customer is used (customer.language.local.code), example de-DE.