It would be nice to see tokens like [order:mail] replaced in extra panes. Is this possible?
Or even done by some other module already?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mr.baileys’s picture

Status: Active » Needs review
FileSize
908 bytes

I agree that this would be a nice feature. My use case: I am building a really simple commerce site based on Commerce Kickstart 2.0. I'd like to use Commerce Extra Panes to replace the default checkout completion message with a more elaborate completion message that also contains payment instructions, for example:

Thank you for your purchase! Please wire [commerce-order:commerce_order_total] to 555-123456789-00 and use [commerce-order:order-number] as reference.

Patch attached runs the contents of the Commerce Extra Panes checkout pane through token_replace().

pcambra’s picture

Status: Needs review » Fixed

Thanks Ivo!

I've changed a little the code for providing more context to the tokens (node and language) and also added support for the Review pane.

It's worth to mention that as Commerce requires entity token, but there's the Token module out there that provides field integration as well and it provides better integration for fields.

Also, I didn't add UI for getting the available tokens, not sure how to solve that out, but let's keep that for a follow up.

Status: Fixed » Closed (fixed)

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