Skip to content

Commit

Permalink
[Checkout][PaymentMethod] Extract description and inject it via the n…
Browse files Browse the repository at this point in the history
…ew event
  • Loading branch information
Jibbarth committed Oct 4, 2023
1 parent bffdb81 commit 8099fe1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/Sylius/Bundle/ShopBundle/Resources/config/app/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,11 @@ sylius_ui:
context:
event: sylius.shop.checkout.select_shipping.before_navigation

sylius.shop.checkout.select_payment.choice_item_content:
blocks:
description:
template: "@SyliusShop/Checkout/SelectPayment/_description.html.twig"

sylius.shop.product.show.left_sidebar:
blocks:
before_legacy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
</div>
<div class="content">
<a class="header">{{ form_label(form, null, {'label_attr': {'data-test-payment-method-label': ''}}) }}</a>
{% if method.description is not null %}
<div class="description">
<p>{{ method.description }}</p>
</div>
{% endif %}
{{ sylius_template_event('sylius.shop.checkout.select_payment.choice_item_content', {'method': method}) }}
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% if method.description is not null %}
<div class="description">
<p>{{ method.description }}</p>
</div>
{% endif %}

0 comments on commit 8099fe1

Please sign in to comment.