[Skip to main content](#vessel-content)

#   Trying to add Order Number / Total to after\_end.php

##

- **[Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")**
- [![Dardwizzle's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51457-dardwizzle "View Dardwizzle's Profile") Topic Author
- [ Offline](/forum/user/51457-dardwizzle)

Less More

- Posts: 140
- Thank you received: 18
-
- [](https://www.eutopiantrader.com)
-

9 years 2 months ago [\#277598](#277598) by [Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")  *[Trying to add Order Number / Total to after\_end.php](/forum/33-customers/891804-trying-to-add-order-number-total-to-after-end-php#277598 "Hi,  Per everything i have read, in order to add the Order Number and Paid Amount to the after&#95;end.php page that displays once an order is complete, I have added the code per the past replies but I am still just seeing the default return page that provides a link to the receipt.  Here is the after&#95;end.php  Thus far, no combination of any of the example code to have the amount and order number display changes the page from the default page return to include these entries. It is making less and less sense since I have followed every example available. :(")* was created by *[Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")*

Hi,

Per everything i have read, in order to add the Order Number and Paid Amount to the after_end.php page that displays once an order is complete, I have added the code per the past replies but I am still just seeing the default return page that provides a link to the receipt.

Here is the after_end.php
Code:

&lt;?php $app =JFactory::getApplication(); $order_id = $app-&gt;getUserState('com_hikashop.order_id'); $orderClass = hikashop_get('class.order'); $currencyClass = hikashop_get('class.currency'); $fullOrder = $orderClass-&gt;get($order_id); $this-&gt;order = $orderClass-&gt;loadFullOrder($order_id,true,false); $this-&gt;order-&gt;order_full_price + $this-&gt;order-&gt;order_discount_price - $this-&gt;order&gt;order-&gt;order_shipping_price - $this-&gt;order-&gt;order_payment_price; $app-&gt;enqueueMessage( JText::_('THANK_YOU_FOR_PURCHASE'); echo $fullOrder-&gt;order_number; $url = hikashop_completeLink('order&amp;task=show&amp;cid='.$this-&gt;order-&gt;order_id); $app-&gt;enqueueMessage(JText::sprintf('YOU_CAN_NOW_ACCESS_YOUR_ORDER_HERE',$url)); $user = JFactory::getUser(); if(!$user-&gt;guest){ $url = hikashop_completeLink('order&amp;task=show&amp;cid='.$this-&gt;order-&gt;order_id); $app-&gt;enqueueMessage(JText::sprintf('YOU_CAN_NOW_ACCESS_YOUR_ORDER_HERE',$url)); }

Thus far, no combination of any of the example code to have the amount and order number display changes the page from the default page return to include these entries. It is making less and less sense since I have followed every example available. ![:(](/media/kunena/emoticons/22.png ":(")

---

(HikaShop Business 3.2.0 \[1709061916\])

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTE4MDQtdHJ5aW5nLXRvLWFkZC1vcmRlci1udW1iZXItdG90YWwtdG8tYWZ0ZXItZW5kLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile")
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

9 years 2 months ago -  9 years 2 months ago [\#277604](#277604) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[Trying to add Order Number / Total to after\_end.php](/forum/33-customers/891804-trying-to-add-order-number-total-to-after-end-php#277604 "Hi,  Per everything i have read, in order to add the Order Number and Paid Amount to the after&#95;end.php page that displays once an order is complete, I have added the code per the past replies but I am still just seeing the default return page that provides a link to the receipt.  Here is the after&#95;end.php  Thus far, no combination of any of the example code to have the amount and order number display changes the page from the default page return to include these entries. It is making less and less sense since I have followed every example available. :(")*

Hi,

You are doing it wrong. Remove all your added code and try again.

To show order number:
Code:

echo $this-&gt;order-&gt;order_number;

To show full order amount you need to load currency.
Code:

$currencyClass = hikashop_get('class.currency');

then
Code:

echo $currencyClass-&gt;format($this-&gt;order-&gt;order_full_price,$this-&gt;order-&gt;order_currency_id);

This does work in end.php so should work and for the after_end.php

Hope that helps.

Kind Regards

Last edit: 9 years 2 months ago by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile").

The following user(s) said Thank You: [Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTE4MDQtdHJ5aW5nLXRvLWFkZC1vcmRlci1udW1iZXItdG90YWwtdG8tYWZ0ZXItZW5kLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")**
- [![Dardwizzle's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51457-dardwizzle "View Dardwizzle's Profile") Topic Author
- [ Offline](/forum/user/51457-dardwizzle)

Less More

- Posts: 140
- Thank you received: 18
-
- [](https://www.eutopiantrader.com)
-

9 years 2 months ago [\#277615](#277615) by [Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")  Replied by *[Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")* on topic *[Trying to add Order Number / Total to after\_end.php](/forum/33-customers/891804-trying-to-add-order-number-total-to-after-end-php#277615 "Hi,  Per everything i have read, in order to add the Order Number and Paid Amount to the after&#95;end.php page that displays once an order is complete, I have added the code per the past replies but I am still just seeing the default return page that provides a link to the receipt.  Here is the after&#95;end.php  Thus far, no combination of any of the example code to have the amount and order number display changes the page from the default page return to include these entries. It is making less and less sense since I have followed every example available. :(")*

Well, I finally got it! Thank you!

It sucks when your a novice at coding but with the help you all provide, I am learning very quickly! ![:)](/media/kunena/emoticons/3.png ":)")

It works perfect now. The code I was trying to use was from other threads with a similar theme and sadly they only tell a small part of the story, not to mention that the bigger problem was I needed to make these changes to the checkout / end.php instead, when the threads I looked up suggested the other.

Thanks a bunch!

---

(HikaShop Business 3.2.0 \[1709061916\])

The following user(s) said Thank You: [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTE4MDQtdHJ5aW5nLXRvLWFkZC1vcmRlci1udW1iZXItdG90YWwtdG8tYWZ0ZXItZW5kLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

9 years 2 months ago [\#277641](#277641) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Trying to add Order Number / Total to after\_end.php](/forum/33-customers/891804-trying-to-add-order-number-total-to-after-end-php#277641 "Hi,  Per everything i have read, in order to add the Order Number and Paid Amount to the after&#95;end.php page that displays once an order is complete, I have added the code per the past replies but I am still just seeing the default return page that provides a link to the receipt.  Here is the after&#95;end.php  Thus far, no combination of any of the example code to have the amount and order number display changes the page from the default page return to include these entries. It is making less and less sense since I have followed every example available. :(")*

Hi,

Editing end or after_end are both valid. It actually depends on the payment method you're using.
If you're using a payment method which redirects the customer to the payment gateway for the payment and then back after it, it's "after_end", if not, then it's the "end" one you want to edit.
So the other threads are probably correct because the user there uses payment methods redirecting to the payment gateway and that's why it didn't work for you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTE4MDQtdHJ5aW5nLXRvLWFkZC1vcmRlci1udW1iZXItdG90YWwtdG8tYWZ0ZXItZW5kLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")**
- [![Dardwizzle's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51457-dardwizzle "View Dardwizzle's Profile") Topic Author
- [ Offline](/forum/user/51457-dardwizzle)

Less More

- Posts: 140
- Thank you received: 18
-
- [](https://www.eutopiantrader.com)
-

9 years 2 months ago [\#277644](#277644) by [Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")  Replied by *[Dardwizzle](/forum/user/51457-dardwizzle "View Dardwizzle's Profile")* on topic *[Trying to add Order Number / Total to after\_end.php](/forum/33-customers/891804-trying-to-add-order-number-total-to-after-end-php#277644 "Hi,  Per everything i have read, in order to add the Order Number and Paid Amount to the after&#95;end.php page that displays once an order is complete, I have added the code per the past replies but I am still just seeing the default return page that provides a link to the receipt.  Here is the after&#95;end.php  Thus far, no combination of any of the example code to have the amount and order number display changes the page from the default page return to include these entries. It is making less and less sense since I have followed every example available. :(")*

Ok, That makes a lot of sense hen. I use Stripe, and it accepts the payment right in the plugin and not redirecting to their gateway, but rather the plugin uses their API, so it's all done right in HikaShop.

The good news is it works beautifully now ![:)](/media/kunena/emoticons/3.png ":)") If only everything worked as well! ![:)](/media/kunena/emoticons/3.png ":)")

---

(HikaShop Business 3.2.0 \[1709061916\])

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTE4MDQtdHJ5aW5nLXRvLWFkZC1vcmRlci1udW1iZXItdG90YWwtdG8tYWZ0ZXItZW5kLXBocD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.065 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
