- Issue created by @andyg5000
- πΊπΈUnited States fathershawn New York
Hi - thanks for the feedback. I wrote that method 7 years ago, when this was a customization for client and not yet contributed, so my best guess is I needed it for that work.
Perhaps the best DX solution at this point is to remove the template but leave the suggestion, since Commerce adds the order bundle type but not the gateway ID as a suggestion
- Merge request !14Issue #3427344 by fathershawn: Clarify order receipt theme suggestions/overrides β (Open) created by fathershawn
- Status changed to Needs review
4 months ago 12:07pm 25 August 2024 - πΊπΈUnited States fathershawn New York
A closer look and I have a better answer. There is a small but important difference between the templates.
The template at
commerce/modules/order/templates/commerce-order-receipt.html.twig
has this block:{% block payment_method %} {{ payment_method }} {% endblock %}
And the template in this module has:
{% block payment_method %} {{ payment_method }} {{ payment_instructions }} {% endblock %}
The payment instruction info is preprocessed in
commerce_purchase_order_preprocess_commerce_order_receipt
. I've changed the template in this module to a clear twig block override. Please would this have saved you time? - πΊπΈUnited States andyg5000 North Carolina, USA
Hey Shawn,
Thanks for making the update and explaining the preprocess. I think all of this makes sense.
Thanks,
Andy