{% extends 'profile/profile-base.twig' %} {% block profile_content %}
{% if subscription %}

{{ fn('pll_e', 'Подписка №') }} {{ subscription.id }}

{{ fn('pll_e', 'Статус') }}

{{ subscription.status | capitalize }}

{{ fn('pll_e', 'Дата подписки') }}

{{ subscription.date_created | date('d.m.Y') }}

{{ fn('pll_e', 'Дата последнего заказа') }}

{{ subscription.last_order_date | date('d.m.Y') }}

{{ fn('pll_e', 'Следующий платеж') }}

{{ subscription.next_payment_date | date('d.m.Y')}}

{{ fn('pll_e', 'Способ оплаты') }}

{{ subscription.payment_method_title}}

{{ fn('pll_e', 'Товары:') }}

{% for item in subscription.items %} {% set product = item.product %} {% set image_id = product.image_id %} {% set product_permalink = product.id ? fn('get_permalink', product.id) : '' %} {# Debug: Display product ID and permalink for testing #}
{% if product.id and product_permalink and product_permalink != fn('get_permalink', fn('get_the_ID')) %} {{ product.name }} {% else %} {{ product.name }} {% endif %}

{{ product.name }}

{{ product.variation_details | default('') }}

{{ item.quantity }}

{{ item.total }}

{% endfor %}

{{ fn('pll_e', 'Сумма') }}

{{ subscription.total }} {{ subscription.currency }} / {{ fn('pll_e', 'месяц') }}

{{ fn('pll_e', 'Доставка') }}

{{ fn('pll_e', 'Бесплатно') }}

{{ fn('pll_e', 'Итого') }}

{{ subscription.total }} {{ subscription.currency }} / {{ fn('pll_e', 'месяц') }}

{{ fn('pll_e', 'Доставка:') }}

{{ fn('pll_e', 'Отменить подписку') }}

{% else %}

{{ fn('pll_e', 'Подписка не найдена.') }}

{% endif %}
{% endblock %}