Skip to content

Order completion form rendering failing if no one Term configured for current Channel #13

@igormukhingmailcom

Description

@igormukhingmailcom

Error:

Neither the property "terms" nor one of the methods "terms()", "getterms()"/"isterms()"/"hasterms()" or "__call()" exist and have public access in class "Symfony\Component\Form\FormView".

Solution: Check for field at template

{# templates/bundles/SyliusShopBundle/Checkout/Complete/_form.html.twig #}
{{ form_row(form.notes, {'attr': {'rows': 3}}) }}

{% if form.terms is defined %}
    {% form_theme form.terms '@SetonoSyliusTermsPlugin/Shop/Form/termsTheme.html.twig' %}
    {{ form_row(form.terms) }}
{% endif %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions