Post by vaskazz » Fri Sep 19, 2014 1:45 am

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.

Newbie

Posts

Joined
Tue Oct 29, 2013 3:11 am


Post by SXGuy » Fri Sep 19, 2014 2:09 am

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.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by vaskazz » Fri Sep 19, 2014 7:24 pm

I got that in mind, but how can I add Payment method instruction based on what payment method was selected during checkout?

Newbie

Posts

Joined
Tue Oct 29, 2013 3:11 am


Post by SXGuy » Sat Sep 20, 2014 4:40 am

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.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by vaskazz » Sat Sep 20, 2014 5:22 am

Got it. Thanks :)

Newbie

Posts

Joined
Tue Oct 29, 2013 3:11 am


Post by mash0028 » Sat Mar 05, 2016 2:41 pm

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>

New member

Posts

Joined
Fri Jul 24, 2015 3:36 pm
Who is online

Users browsing this forum: No registered users and 51 guests