The commerce_payment module defines a theme hook 'commerce_payment_transaction', but it doesn't define a theme_commerce_payment_transaction function or a template. The fact that this still "works" is somewhat surprising to me since I'm relatively certain that this is not intended behaviour - maybe I'm wrong and you can correct me on this. In my case, it caused some very interesting issues when I tried to customize the transaction display with a hook_preprocess_commerce_payment_transaction implementation (which doesn't work).
I think, the module should provide a reasonable default theme implementation along the lines of
function theme_commerce_payment_transaction($variables) {
return render($variables['content']);
}
Comment | File | Size | Author |
---|---|---|---|
#2 | 2512632-2.patch | 607 bytes | mglaman |
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedTagging for http://contribkanban.com/#/board/commerce/7.x-1.x.
Comment #2
mglamanPatch!
Comment #3
rszrama CreditAttribution: rszrama commentedNice - didn't know it would be so small. Can you check our other entity types as well? There may even be an open issue about all of our entity types missing an implementation, but it could also just be a missing template.
Comment #4
getu-lar CreditAttribution: getu-lar as a volunteer commented@rszrama: I can't seem to find an open issue for generally missing theme implementations and I'm somewhat reluctant to create a potential duplicate. Does such an issue exist or not?
@mglaman: thanks for the patch :)
Comment #5
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 4 year old patch in #2 to commerce_payment.module applied cleanly to the latest commerce 7.x-1.x-dev, but still needs to be reviewed and tested.
Comment #6
rszrama CreditAttribution: rszrama at Centarro commentedCommitting.
Comment #8
rszrama CreditAttribution: rszrama at Centarro commented