How to Add Missing Information to the Documents in Shopware 6?

Documents in Shopware 6

In Shopware 6, you can add the missing information to the documents like company information and notes as well as all the information which are necessary for the documents which you are providing to the customers. Information like the company’s email address along with the website in the setting of the document.

To add them, you need to override the base.html.twig template file in your own custom theme. The directory custom/plugins/Custom Theme/src/Resources/views/documents/base.html.twig.

Step 1: If the file and/or directory do not exist, create it accordingly in your Custom Theme.

Step 2: Add the following code to the file base.html.twig template:

{% sw_extends '@Framework/documents/base.html.twig' %}

{% block document_footer_first_column %}
    {{ parent() }}
    <ul>
        {% block document_footer_companyEmail %}
            {% if config.companyEmail %} 
                <li class="bold">E-Mail</li>
                <li><a href="mailto:{{ config.companyEmail }}">{{ config.companyEmail }}</a></li>
            {% endif %}
        {% endblock %}
        {% block document_footer_companyUrl %}
            {% if config.companyUrl  %} 
                <li class="bold">Webseite</li>
            <li ><a href="{{ config.companyUrl }}"> {{ config.companyUrl }}</a></li>
            {% endif %}
        {% endblock %}
</ul>
{% endblock %}

Step 3: After adding all the information which is missing as per your requirement save the changes then it may be necessary to empty the shop cache. This can be done from the admin as well as using the command.

Command to clear the cache:

php bin/console cache:clear

Once the above steps are done then you can view the document to check your changes.

Please contact us at manish@bay20.com or call us at +91-8800519180 for any support related to shopware. You can also visit the Shopware development page to check the services we offer.