I tried to use [order ID] in the instructions field, but it prints out as [order ID], not the actual value.

It would be for the reference feild on the payments.

Comments

xibun’s picture

Category: bug » support
Status: Active » Fixed

this is currently not supported. you can only activate it with the checkbox.

xibun’s picture

Title: [order ID] cant be used in the Payment instructions field » [order-id] can't be used in the Payment instructions field
Category: support » feature
Status: Fixed » Active

I had a deeper look into your request. What you try to do would work when tokens would be processed recursively. In my understanding currently this is not implemented.

But it seems in Drupal 7 this will be the case:
http://drupal.org/node/113614#comment-1804140

For Drupal 6 the substitution would need to happen inside uc_bank_transfer.Btw: the correct token provided by ubercart is [order-id] and not [order ID].

nzpunter’s picture

ok,

I was workiong off the text give in the payment details page
"Subject: order number [order ID]"
needs to be changed to [order-ID]

does this send an email with the bank details? as it seems formatted for email, but nothing is sent.

and thanks for your work on this module!

xibun’s picture

I actually saw that :). But I'm not sure if I should change it, as I'm NOT referring to the token.

I will hold changes for the moment, I have more ideas for this area... mostly I would like different messages for checkout / review / invoice. When working on that I can also work on the token issue...

pieterdc’s picture

Version: 6.x-1.x-dev » 6.x-1.0
Status: Active » Needs review
StatusFileSize
new1.68 KB

I guess this would need some documentation and adjusted UI descriptions or so.. So people know they can use order tokens.
But hey, the patch works.

pieterdc’s picture

I just found out it's better to use echo theme('uc_bank_transfer_bank_details', $order); in the order/invoice tpl.php file than echo $order_payment_bank_details; to avoid token replacement recursion, and thus not all tokens getting replaced (because the token module blocks recursion to avoid memory outages).

Cfr. template_preprocess_uc_order() which loads all order tokens (for use in the tpl.php file) and thus also uc_bank_transfer_token_values() and thus also theme_uc_bank_transfer_bank_details() which again loads all tokens...