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

#   Need to put code on the Thank-you page

##

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

Less More

- Posts: 6
- Thank you received: 0
-
-

12 years 9 months ago [\#141776](#141776) by [Jojo](/forum/user/30824-jojo "View Jojo's Profile")  *[Need to put code on the Thank-you page](/forum/27-checkout/865436-need-to-put-code-on-the-thank-you-page#141776 "-- HikaShop version -- : latest (Starter) -- Joomla version -- : 3.2.1 -- PHP version -- : 5.3.28  Hi there,  I need help again. I need to put a tracking-code on the last checkout-page, after a sale is complete. didn't work.  What I have done already: - I have put my code in the checkout/end.php --&gt; no success - I've put it in /administrator/components/com&#95;hikashop/extensions/plg&#95;hikashoppayment&#95;banktransferbanktransfer&#95;end.php --&gt; no success  This is the code in the end.php, which I've modified:  Tracking-code doesn't work. Even &quot;Hello World...&quot; isn't printed...  Any suggestions what's wrong here or which file I have to modifiy??  Thanks a lot in advance!!")* was created by *[Jojo](/forum/user/30824-jojo "View Jojo's Profile")*

-- HikaShop version -- : latest (Starter)
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.3.28

Hi there,

I need help again. I need to put a tracking-code on the last checkout-page, after a sale is complete. [ This thread](http://www.hikashop.com/forum/4-how-to/15949-putting-tracking-cookies-into-the-comfirmaion-page.html) didn't work.

What I have done already:
- I have put my code in the checkout/end.php --&gt; no success
- I've put it in /administrator/components/com_hikashop/extensions/plg_hikashoppayment_banktransferbanktransfer_end.php --&gt; no success

This is the code in the end.php, which I've modified: Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.2.3 * @author hikashop.com * @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php if(empty($this-&gt;html)){ echo JText::_('THANK_YOU_FOR_PURCHASE'); }else{ echo $this-&gt;html; } &lt;?php $ad_ordernumber = $this-&gt;order_number; $ad_net_amount_step = $this-&gt;amount; $ad_net_amount = round($ad_net_amount/1.19); echo 'Hello Test-World. Say something!!&lt;/br&gt;'; echo $ad_net_amount; ?&gt; &lt;!-- Trackingcode --&gt; &lt;script type="text/javascript" src="//www.xxxxxxx.com/js/jsadlib.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; Aff.user.track({ 'eventid' : 12345, 'referenz' : '&lt;?php echo $ad_ordernumber; ?&gt;', 'betrag' : &lt;?php echo $ad_net_amount; ?&gt;, 'pid' : 12345 }); &lt;/script&gt; &lt;noscript&gt; &lt;img src="//www.xxxxxxx.com/event.php?pid=12345&amp;eventid=4454&amp;referenz=&lt;?php echo $ad_ordernumber; ?&gt;&amp;betrag=&lt;?php echo $ad_net_amount; ?&gt;" border="0" width="1" height="1"&gt; &lt;/noscript&gt; $this-&gt;nextButton = false;

Tracking-code doesn't work. Even "Hello World..." isn't printed...

Any suggestions what's wrong here or which file I have to modifiy??

Thanks a lot in advance!!

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

12 years 9 months ago [\#141787](#141787) by [Jojo](/forum/user/30824-jojo "View Jojo's Profile")  Replied by *[Jojo](/forum/user/30824-jojo "View Jojo's Profile")* on topic *[Need to put code on the Thank-you page](/forum/27-checkout/865436-need-to-put-code-on-the-thank-you-page#141787 "-- HikaShop version -- : latest (Starter) -- Joomla version -- : 3.2.1 -- PHP version -- : 5.3.28  Hi there,  I need help again. I need to put a tracking-code on the last checkout-page, after a sale is complete. didn't work.  What I have done already: - I have put my code in the checkout/end.php --&gt; no success - I've put it in /administrator/components/com&#95;hikashop/extensions/plg&#95;hikashoppayment&#95;banktransferbanktransfer&#95;end.php --&gt; no success  This is the code in the end.php, which I've modified:  Tracking-code doesn't work. Even &quot;Hello World...&quot; isn't printed...  Any suggestions what's wrong here or which file I have to modifiy??  Thanks a lot in advance!!")*

It's me again...

Okay I got it. It's the checkout/end.php file and modifications are only visible when editing via views -&gt; display -&gt; end.php

But my code causes errors. I need the order-number and the net-amount as a variable. As I wrote, I tried to fetch the values like this:

$ad_ordernumber = $this-&gt;order_number;
$ad_net_amount_step = $this-&gt;amount;

This does not work. Anybody knows, how to catch the order-number and the net-amount?

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

12 years 9 months ago [\#141788](#141788) by [Jojo](/forum/user/30824-jojo "View Jojo's Profile")  Replied by *[Jojo](/forum/user/30824-jojo "View Jojo's Profile")* on topic *[Need to put code on the Thank-you page](/forum/27-checkout/865436-need-to-put-code-on-the-thank-you-page#141788 "-- HikaShop version -- : latest (Starter) -- Joomla version -- : 3.2.1 -- PHP version -- : 5.3.28  Hi there,  I need help again. I need to put a tracking-code on the last checkout-page, after a sale is complete. didn't work.  What I have done already: - I have put my code in the checkout/end.php --&gt; no success - I've put it in /administrator/components/com&#95;hikashop/extensions/plg&#95;hikashoppayment&#95;banktransferbanktransfer&#95;end.php --&gt; no success  This is the code in the end.php, which I've modified:  Tracking-code doesn't work. Even &quot;Hello World...&quot; isn't printed...  Any suggestions what's wrong here or which file I have to modifiy??  Thanks a lot in advance!!")*

Now I tried this (end.php):

$orderClass = hikashop::get('class.order');
$order = $orderClass-&gt;loadFullOrder($order_id);
echo 'Total:&lt;/br&gt;';
echo $order-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax;
echo 'Order number:&lt;/br&gt;';
echo $order-&gt;order_number;

What's wrong here?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NTQzNi1uZWVkLXRvLXB1dC1jb2RlLW9uLXRoZS10aGFuay15b3UtcGFnZT90bXBsPW1hcmtkb3du) 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: 86587
- Thank you received: 14326
-
-

12 years 9 months ago -  12 years 9 months ago [\#141838](#141838) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Need to put code on the Thank-you page](/forum/27-checkout/865436-need-to-put-code-on-the-thank-you-page#141838 "-- HikaShop version -- : latest (Starter) -- Joomla version -- : 3.2.1 -- PHP version -- : 5.3.28  Hi there,  I need help again. I need to put a tracking-code on the last checkout-page, after a sale is complete. didn't work.  What I have done already: - I have put my code in the checkout/end.php --&gt; no success - I've put it in /administrator/components/com&#95;hikashop/extensions/plg&#95;hikashoppayment&#95;banktransferbanktransfer&#95;end.php --&gt; no success  This is the code in the end.php, which I've modified:  Tracking-code doesn't work. Even &quot;Hello World...&quot; isn't printed...  Any suggestions what's wrong here or which file I have to modifiy??  Thanks a lot in advance!!")*

Hi,

You should use such code in the end file: Code:

$order_id = JRequest::getInt('order_id'); if(empty($order_id)){ $app = JFactory::getApplication(); $order_id = $app-&gt;getUserState('com_hikashop.order_id'); } $order =null; if(!empty($order_id)){ $orderClass = hikashop_get('class.order'); $order = $orderClass-&gt;loadFullOrder($order_id,false,false); echo 'Total:&lt;/br&gt;'; echo $order-&gt;order_full_price; echo 'Order number:&lt;/br&gt;'; echo $order-&gt;order_number; }

Last edit: 12 years 9 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [Jojo](/forum/user/30824-jojo "View Jojo's Profile")

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

12 years 9 months ago [\#141889](#141889) by [Jojo](/forum/user/30824-jojo "View Jojo's Profile")  Replied by *[Jojo](/forum/user/30824-jojo "View Jojo's Profile")* on topic *[Need to put code on the Thank-you page](/forum/27-checkout/865436-need-to-put-code-on-the-thank-you-page#141889 "-- HikaShop version -- : latest (Starter) -- Joomla version -- : 3.2.1 -- PHP version -- : 5.3.28  Hi there,  I need help again. I need to put a tracking-code on the last checkout-page, after a sale is complete. didn't work.  What I have done already: - I have put my code in the checkout/end.php --&gt; no success - I've put it in /administrator/components/com&#95;hikashop/extensions/plg&#95;hikashoppayment&#95;banktransferbanktransfer&#95;end.php --&gt; no success  This is the code in the end.php, which I've modified:  Tracking-code doesn't work. Even &quot;Hello World...&quot; isn't printed...  Any suggestions what's wrong here or which file I have to modifiy??  Thanks a lot in advance!!")*

Nicolas, thanks a lot! That's it.

Just to understand, I need to initiate the classes via the function JRequest::getInt() and JFactory::getApplication()?!

Well, however, everything works fine now, an I'll switch over from "play mode" to serious business. After setting up the shop and creating all the products, I'll upgrade to business version. Your support is great, so I feel comfortable here, just for the event something's crashing!!

Thanks and have a nice weekend ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NTQzNi1uZWVkLXRvLXB1dC1jb2RlLW9uLXRoZS10aGFuay15b3UtcGFnZT90bXBsPW1hcmtkb3du) 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: 86587
- Thank you received: 14326
-
-

12 years 9 months ago [\#141976](#141976) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Need to put code on the Thank-you page](/forum/27-checkout/865436-need-to-put-code-on-the-thank-you-page#141976 "-- HikaShop version -- : latest (Starter) -- Joomla version -- : 3.2.1 -- PHP version -- : 5.3.28  Hi there,  I need help again. I need to put a tracking-code on the last checkout-page, after a sale is complete. didn't work.  What I have done already: - I have put my code in the checkout/end.php --&gt; no success - I've put it in /administrator/components/com&#95;hikashop/extensions/plg&#95;hikashoppayment&#95;banktransferbanktransfer&#95;end.php --&gt; no success  This is the code in the end.php, which I've modified:  Tracking-code doesn't work. Even &quot;Hello World...&quot; isn't printed...  Any suggestions what's wrong here or which file I have to modifiy??  Thanks a lot in advance!!")*

Yes, the variables need to be initialized before you use them.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2NTQzNi1uZWVkLXRvLXB1dC1jb2RlLW9uLXRoZS10aGFuay15b3UtcGFnZT90bXBsPW1hcmtkb3du) 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.059 seconds

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