Skip to main content

Add the JS to the end of checkout

More
10 years 2 months ago #246953 by progfloyd
Hello,

I got an affliate code like this:
Code:
<script> 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 }); </script>

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 or Create an account to join the conversation.

More
10 years 2 months ago #246960 by Mohamed Thelji
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->order" variable.

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #246997 by progfloyd
Hello,

I try to add the code:
Code:
<?php echo $this->order->order_number;?>

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

Thank you very much.

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #247007 by Mohamed Thelji
Hello,

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.165 seconds
Powered by Kunena Forum