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']);
}
CommentFileSizeAuthor
#2 2512632-2.patch607 bytesmglaman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Version: 7.x-1.11 » 7.x-1.x-dev
Issue tags: +sprint
mglaman’s picture

Status: Active » Needs review
FileSize
607 bytes

Patch!

rszrama’s picture

Nice - 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.

getu-lar’s picture

@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 :)

Chris Matthews’s picture

The 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.

rszrama’s picture

Status: Needs review » Reviewed & tested by the community

Committing.

  • rszrama committed 7928642 on 7.x-1.x authored by mglaman
    Issue #2512632 by mglaman, getu-lar: add a commerce_payment_transaction...
rszrama’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.