-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checkout process templates missing #2
Comments
@ZZromanZZ did you solved it? Could you share with us please? |
In the end, my frontend is very different from Sylius default template, so I didn't have to. However at least for frontend demo purposes, it would nice to have. |
You need to customize the block responsible for generating label for payment method. You can do it by creating your own theme and applying it into the twig file responsible for displaying checkout form. In my case the block name is {% extends '@SyliusShop/Form/theme.html.twig' %}
{% block _checkout_form_payments_entry_method_entry_label %}
{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% set label = form.vars.label %}
{% set payment_cost = form.parent.vars.payment_costs[form.vars.value] %}
{% if payment_cost > 0 %}
{% set label = label ~ ' (+' ~ money.convertAndFormat(payment_cost) ~ ')' %}
{% endif %}
{{- form_label(form, label) -}}
{% endblock %} |
It would be nice to have frontend checkout templates that has payment fee support.
The text was updated successfully, but these errors were encountered: