Skip to content

[Admin] Subscription twig hooks #221

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

Merged
merged 8 commits into from
May 28, 2025

Conversation

Cholin2000
Copy link
Collaborator

@Cholin2000 Cholin2000 commented May 26, 2025

screencapture-127-0-0-1-8000-admin-mollie-subscription-2025-05-27-09_59_05

screencapture-127-0-0-1-8000-admin-mollie-subscription-1-2025-05-27-10_24_57

@Cholin2000 Cholin2000 marked this pull request as ready for review May 27, 2025 08:28
Comment on lines +1 to +9
{% set mollie_subscription = hookable_metadata.context.resource %}
{% set orderItem = mollie_subscription.orderItem %}

{% if orderItem is not null %}
<div class="row mb-2 border-bottom pb-2">
<div class="col-md-4 fw-bold">{{ 'sylius.ui.item'|trans }} {{ 'sylius.ui.id'|trans }}</div>
<div class="col-md-8">{{ orderItem.id }}</div>
</div>
{% endif %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed

{% if customer is not null %}
<div class="row mb-2 border-bottom pb-2">
<div class="col-md-4 fw-bold">{{ 'sylius.ui.email'|trans }} {{ 'sylius.ui.email'|trans }}</div>
<div class="col-md-8">{{ customer.email }}</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it hyperlink to customer page

@@ -0,0 +1,5 @@
<div class="page-body">
<div class="container-xl">
{% hook 'sections' with { user: hookable_metadata.context.resource|default(null) } %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{% hook 'sections' with { user: hookable_metadata.context.resource|default(null) } %}
{% hook 'sections' %}

@Wojdylak Wojdylak merged commit fd61d9a into Sylius:3.0 May 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants