PAYONE-GmbH / shopware-6

PAYONE Payment Plugin for Shopware 6
MIT License
14 stars 19 forks source link

parent function in component for compati #231

Closed ulbiopro closed 1 year ago

ulbiopro commented 1 year ago

Hi,

short question: Is it possible for you guys to use parent function in components templates? This way it is still possible for extensions called before to add information to blocks.

For instance in this case:

https://github.com/PAYONE-GmbH/shopware-6/blob/master/src/Resources/app/administration/src/module/sw-order/component/sw-order-user-card/sw-order-user-card.html.twig

If we wanted to add some information to the payment label or type, it'll be always overridden by your extension. Imho, it would be a better approach to use parent. In that case other third-party-plugins can still override the template without any issues. Still not very neat, but since we can't define any priorities to component overriding, this would help a little. (https://github.com/shopware/platform/pull/2210)

{% block sw_order_detail_base_secondary_info_payment %}
    {% parent %}
    <template v-if="payoneCardType">
        <dd>
            {{ $tc('sw-order.payone-payment.creditCard.cardTypeLabel') }}: {{ payoneCardType }}
        </dd>
    </template>
{% endblock %}

thank you :)

best regards

janteuber commented 1 year ago

Hello @ulbiopro ,

Thank you very much for your message.

I will have our developers look into this issue and get back to you as soon as I have an answer.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.