Page 1 of 1
Payment instructions after purchase
Posted: Fri Sep 19, 2014 1:45 am
by vaskazz
Hello,
How can I add Payment instruction to success page? It is relevant for bank transfer payment mostly. (I am using few bank transfer payment methods for different banks.). Please help.
Re: Payment instructions after purchase
Posted: Fri Sep 19, 2014 2:09 am
by SXGuy
Edit catalog/view/theme/yourtheme/template/common/success.tpl
But you need to bare in mind the success page is used for many things other than completed orders, so you may find it shows up in places you don't want it to.
Re: Payment instructions after purchase
Posted: Fri Sep 19, 2014 7:24 pm
by vaskazz
I got that in mind, but how can I add Payment method instruction based on what payment method was selected during checkout?
Re: Payment instructions after purchase
Posted: Sat Sep 20, 2014 4:40 am
by SXGuy
That's not something I can explain simply. It would need to be a custom job, paid to a developer to do, id suggest you post in the section where developers can offer their services.
Re: Payment instructions after purchase
Posted: Sat Sep 20, 2014 5:22 am
by vaskazz
Got it. Thanks

Re: Payment instructions after purchase
Posted: Sat Mar 05, 2016 2:41 pm
by mash0028
Hello
It works in my success page.
Add this to your catalog/controller/checkout/success.php
If you successfully change the controller file of your checkout success page just add this code in controller file.
just bellow
Code: Select all
$data['totals'] = array();
$totals = $this->model_account_order->getOrderTotals($this->session->data['order_id']);
foreach ($totals as $total) {
$data['totals'][] = array(
'title' => $total['title'],
'text' => $this->currency->format($total['value'], $order_info['currency_code'], $order_info['currency_value'])
);
}
Add this code
Code: Select all
// History
$data['histories'] = array();
$results = $this->model_account_order->getOrderHistories($this->session->data['order_id']);
foreach ($results as $result) {
$data['histories'][] = array(
'comment' => nl2br($result['comment'])
);
}
Just in case your success page is the default success page of opencart, try to search in extension page for FREE CUSTOM SUCCESS PAGE, have a customer details in success page for you to find the code I am saying.
Then Add this to your TPL FILE
in your catalog/view/theme/*/template/common/success.tpl
Code: Select all
<table class="csd_table">
<thead>
<tr>
<td><?php echo $text_pminstruction; ?></td>
</tr>
</thead>
<tbody>
<?php foreach ($histories as $history) { ?>
<tr>
<td ><?php echo $history['comment']; ?></td>
</tr>
<?php } ?>
</tbody>
</table>