Post by jbarrick » Tue Oct 06, 2009 7:42 am

How can I edit the success page to show

"Your order number is ___________________"

And

"To view and print your invoice click here." (with a link to the invoice of this transaction)

I found where to edit the actual text, but how do I display the order number and a link to the correct invoice?

New member

Posts

Joined
Fri Aug 28, 2009 7:23 am

Post by Qphoria » Sat Oct 10, 2009 5:36 am

1. EDIT: catalog/controller/checkout/success.php
2. FIND:

Code: Select all

$this->cart->clear();
3. BEFORE, ADD:

Code: Select all

$this->session->data['success_order_id'] = $this->session->data['order_id'];
4. EDIT: catalog/view/theme/YOURTHEME/template/common/success.tpl
5. FIND:

Code: Select all

<div class="buttons">
6. BEFORE, ADD:

Code: Select all

  <?php if (isset($this->session->data['success_order_id'])) { ?>
  <h3>Your Order Number is: <a href="<?php echo $this->url->http('account/invoice&order_id=' . $this->session->data['success_order_id']); ?>"><?php echo $this->session->data['success_order_id']; ?></a></h3>
  <?php unset($this->session->data['success_order_id']); ?>
  <?php } ?>

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by theone » Mon Sep 12, 2011 7:59 am

hi, can you please confirm if this code is ok? as i tried and i cant see the order number..
im on version 1.4.9.2
please confirm if possible.
thanks a lot for your time.

New member

Posts

Joined
Sat Oct 30, 2010 9:09 am

Post by theone » Fri Sep 16, 2011 5:07 am

im happy to pay if you can help me in this issue

i dont want to install vqmod

thanks for looking

New member

Posts

Joined
Sat Oct 30, 2010 9:09 am

Post by theone » Fri Sep 16, 2011 10:57 pm

ok i got it,

i put this code at step 6 and now its working good.

<div class="middle"><?php $str = "Your Order ID is: "; echo $str; echo $this->session->data['success_order_id']; ?>
<?php unset($this->session->data['success_order_id']); ?>


thanks Qphoria for the hints

New member

Posts

Joined
Sat Oct 30, 2010 9:09 am

Post by uqmeng » Tue Dec 06, 2011 8:31 pm

Remove

Code: Select all

$this->url->http()
Modified to show the normal,catalog/view/theme/YOURTHEME/template/common/success.tpl

Code: Select all

  <?php if (isset($this->session->data['success_order_id'])) { ?>
  <h3>Your Order Number is: <a href="<?php echo 'index.php?route=account/invoice&order_id=' . $this->session->data['success_order_id']; ?>"><?php echo $this->session->data['success_order_id']; ?></a></h3>
  <?php unset($this->session->data['success_order_id']); ?>
  <?php } ?>

New member

Posts

Joined
Sun Mar 06, 2011 9:49 pm
Who is online

Users browsing this forum: Bing [Bot] and 9 guests