Modify Google Conversion Code

  • Posts: 259
  • Thank you received: 22
10 years 2 months ago #193991

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6

I have added Google Analytics conversion code to the view checkout-afterend and was wondering how I could inject the actual value of the shopping cart into the script to replace Googles estimated value.

In the Google script is the line:

var google_conversion_value = 1.000000;

and I want to replace the 1.00000 with the total value of the cart.

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 2 months ago #194077

Hi,

In "after_end" view, you have access to the order object

$this->order;
It means that you can read any value from the order to display/use it in the view, like
$this->order->order_full_price;

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: rodfarrell

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

Time to create page: 0.090 seconds
Powered by Kunena Forum