I was looking for a way to show the Order ID to customers who want to use the bank transfer payment option. There are some commercial extensions that also provide this, but it turns out it's not really that hard to do yourself.
Hopefully I can help someone out in this way.
Go to: /catalog/controller/payment/bank_transfer.php
find this line of code (for me at was line 11'ish):
Code: Select all
$this->data['bank'] = nl2br($this->config->get('bank_transfer_bank_' . $this->config->get('config_language_id')));
Code: Select all
$this->data['bank'] = str_replace('%order_id%', $this->session->data['order_id'], $this->data['bank']);
Code: Select all
$this->data['bank'] = nl2br($this->config->get('bank_transfer_bank_' . $this->config->get('config_language_id')));
$this->data['bank'] = str_replace('%order_id%', $this->session->data['order_id'], $this->data['bank']);
Code: Select all
$comment .= $this->language->get('text_payment');
Code: Select all
$comment = str_replace('%order_id%', $this->session->data['order_id'], $comment);
Code: Select all
$comment .= $this->language->get('text_payment');
$comment = str_replace('%order_id%', $this->session->data['order_id'], $comment);
For instance: Wire the total amount due to bank account: 1234 and mention your order id: %order_id%
The user will see: Wire the total amount due to bank account: 1234 and mention your order id: 23
And that's it. I've tested this on version 1.5.3 but I'm sure other versions can be modified in a similar fashion.