custom/plugins/econdWebAnalytics/src/Resources/views/storefront/page/account/newsletter.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/account/newsletter.html.twig' %}
  2. {% block page_account_overview_newsletter_content_inner %}
  3.     {% if feature('FEATURE_NEXT_14001') %}
  4.         {# @deprecated tag:v6.5.0 - variables success, messages and customer will be removed and found as properties of newsletterAccountPagelet #}
  5.         {% set success = newsletterAccountPagelet.success %}
  6.         {% set messages = newsletterAccountPagelet.messages %}
  7.         {% set customer = newsletterAccountPagelet.customer %}
  8.     {% endif %}
  9.     {% block page_account_overview_newsletter_content_success  %}
  10.         {% if feature('FEATURE_NEXT_14001') %}
  11.             {% if newsletterAccountPagelet.messages|length > 0 %}
  12.                 <div class="newsletter-alerts">
  13.                     {% for message in newsletterAccountPagelet.messages %}
  14.                         {% sw_include "@Storefront/storefront/utilities/alert.html.twig" with { 'type': message.type, 'content': message.text} %}
  15.                     {% endfor %}
  16.                 </div>
  17.             {% endif %}
  18.         {% else %}
  19.             {% if success is not null %}
  20.                 <div class="newsletter-alerts">
  21.                     {% for message in messages %}
  22.                         {% sw_include "@Storefront/storefront/utilities/alert.html.twig" with { 'type': message.type, 'content': message.text} %}
  23.                     {% endfor %}
  24.                 </div>
  25.             {% endif %}
  26.         {% endif %}
  27.     {% endblock %}
  28.     {% set formAutoSubmitOptions = {
  29.         useAjax: true,
  30.         ajaxContainerSelector: '.js-newsletter-wrapper'
  31.     } %}
  32.     {% block page_account_overview_newsletter_content_form %}
  33.         {% block page_account_overview_newsletter_content_form_check_control %}
  34.             <div class="{{ formCheckboxWrapperClass }}">
  35.                 {% block page_account_overview_newsletter_content_form_input %}
  36.                     {% set subscribe = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::OPTION_SUBSCRIBE') %}
  37.                     {% set direct = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::OPTION_DIRECT') %}
  38.                     {% set statusDirect = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::STATUS_DIRECT') %}
  39.                     {% set statusOptIn = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::STATUS_OPT_IN') %}
  40.                     {% set statusNotSet = constant('Shopware\\Core\\Content\\Newsletter\\SalesChannel\\NewsletterSubscribeRoute::STATUS_NOT_SET') %}
  41.                     {% set status = false %}
  42.                     {% if newsletterAccountPagelet.newsletterStatus == statusDirect or newsletterAccountPagelet.newsletterStatus == statusOptIn or newsletterAccountPagelet.newsletterStatus == statusNotSet %}
  43.                         {% set status = true %}
  44.                     {% endif %}
  45.                     {% if feature('FEATURE_NEXT_14001') == false %}
  46.                         {% set status = true %}
  47.                     {% endif %}
  48.                     <input type="checkbox"
  49.                            class="{{ formCheckInputClass }}"
  50.                            id="newsletterRegister"
  51.                            name="option"
  52.                            autocomplete="off"
  53.                            value="subscribe"
  54.                            {% if status %}checked="checked"{% endif %}>
  55.                 {% endblock %}
  56.                 {% block page_account_overview_newsletter_content_form_label %}
  57.                     <label class="{{ formCheckLabelClass }} custom-control-label"
  58.                            for="newsletterRegister">
  59.                         {{ "account.newsletterSettings"|trans({'%shopname%': config('core.basicInformation.shopName')})|sw_sanitize }}
  60.                     </label>
  61.                 {% endblock %}
  62.             </div>
  63.         {% endblock %}
  64.     {% endblock %}
  65. {% endblock %}