Reorganize checkout payment hooks

This commit is contained in:
Bartłomiej Sęk 2024-11-05 08:40:28 +01:00
parent 98fffe95e4
commit 3e6b35864b
12 changed files with 13 additions and 8 deletions

View file

@ -1,6 +1,10 @@
sylius_twig_hooks:
hooks:
'sylius_shop.checkout.select_payment':
content:
template: '@SyliusShop/checkout/select_payment/content.html.twig'
priority: 0
'sylius_shop.checkout.select_payment.content':
steps:
template: '@SyliusShop/checkout/shared/steps.html.twig'
priority: 100
@ -8,13 +12,13 @@ sylius_twig_hooks:
component: 'sylius_shop:checkout:payment:form'
props:
resource: '@=_context.order'
template: '@SyliusShop/checkout/select_payment/form.html.twig'
template: '@SyliusShop/checkout/select_payment/content/form.html.twig'
priority: 0
'sylius_shop.checkout.select_payment.form':
'sylius_shop.checkout.select_payment.content.form':
payments:
template: '@SyliusShop/checkout/select_payment/form/payments.html.twig'
template: '@SyliusShop/checkout/select_payment/content/form/payments.html.twig'
priority: 100
navigation:
template: '@SyliusShop/checkout/select_payment/form/navigation.html.twig'
template: '@SyliusShop/checkout/select_payment/content/form/navigation.html.twig'
priority: 0

View file

@ -8,7 +8,5 @@
{% endblock %}
{% block content %}
<div class="pe-lg-6">
{% hook 'select_payment' with { _prefixes: prefixes, active_step, form, order } %}
</div>
{% hook 'select_payment' with { _prefixes: prefixes, active_step, form, order } %}
{% endblock %}

View file

@ -0,0 +1,3 @@
<div class="pe-lg-6">
{% hook 'content' %}
</div>