Add the JS to the end of checkout

  • Posts: 20
  • Thank you received: 0
  • Hikashop Business
8 years 3 months ago #246953

Hello,

I got an affliate code like this:

<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.

  • Posts: 12953
  • Thank you received: 1778
8 years 3 months ago #246960

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.

  • Posts: 20
  • Thank you received: 0
  • Hikashop Business
8 years 3 months ago #246997

Hello,

I try to add the 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.

  • Posts: 12953
  • Thank you received: 1778
8 years 3 months ago #247007

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.057 seconds
Powered by Kunena Forum