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

#   Add the JS to the end of checkout

##

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

Less More

- Posts: 20
- Thank you received: 0
-
-

10 years 3 months ago [\#246953](#246953) by [progfloyd](/forum/user/42261-progfloyd "View progfloyd's Profile")  *[Add the JS to the end of checkout](/forum/27-checkout/885869-add-the-js-to-the-end-of-checkout#246953 "Hello,  I got an affliate code like this:  I wnat to add this code to the end.php of the checkout. How can I get the &quot;order total&quot; and the &quot;order number&quot; from the order?  Thank you. :blush:  Regards, JS")* was created by *[progfloyd](/forum/user/42261-progfloyd "View progfloyd's Profile")*

Hello,

I got an affliate code like this: Code:

&lt;script&gt; VA.remoteLoad({ whiteLabel: { id: 8, siteId: 1201, domain: 'vbtrax.com' }, conversion: true, conversionData: { step: 'sale', // conversion name revenue: '', // revenue share orderTotal: '', // order total order: '' // order number }, locale: "en-US", mkt: true }); &lt;/script&gt;

I wnat to add this code to the end.php of the checkout.
How can I get the "order total" and the "order number" from the order?

Thank you. :blush:

Regards,
JS

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

10 years 3 months ago [\#246960](#246960) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Add the JS to the end of checkout](/forum/27-checkout/885869-add-the-js-to-the-end-of-checkout#246960 "Hello,  I got an affliate code like this:  I wnat to add this code to the end.php of the checkout. How can I get the &quot;order total&quot; and the &quot;order number&quot; from the order?  Thank you. :blush:  Regards, JS")*

Hello,

The best solution in your case will be to put your JS code through the "After_end" file of the "Checkout" view of your front-end template via "Hikashop".
Also, Order informations can be accessed using the "$this-&gt;order" variable.

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

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

Less More

- Posts: 20
- Thank you received: 0
-
-

10 years 3 months ago [\#246997](#246997) by [progfloyd](/forum/user/42261-progfloyd "View progfloyd's Profile")  Replied by *[progfloyd](/forum/user/42261-progfloyd "View progfloyd's Profile")* on topic *[Add the JS to the end of checkout](/forum/27-checkout/885869-add-the-js-to-the-end-of-checkout#246997 "Hello,  I got an affliate code like this:  I wnat to add this code to the end.php of the checkout. How can I get the &quot;order total&quot; and the &quot;order number&quot; from the order?  Thank you. :blush:  Regards, JS")*

Hello,

I try to add the code: Code:

&lt;?php echo $this-&gt;order-&gt;order_number;?&gt;

But It can't get the order number,
Do I miss something?

Thank you very much.

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

10 years 3 months ago [\#247007](#247007) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Add the JS to the end of checkout](/forum/27-checkout/885869-add-the-js-to-the-end-of-checkout#247007 "Hello,  I got an affliate code like this:  I wnat to add this code to the end.php of the checkout. How can I get the &quot;order total&quot; and the &quot;order number&quot; from the order?  Thank you. :blush:  Regards, JS")*

Hello,

You should firstly see what you have on the "$this-&gt;order" variable by using a var_dump.

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

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