Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

variable for order total

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-26-2012, 11:14 AM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default variable for order total

I am trying to set up my google conversion analytics and supposedly I can use this
Code:
<!-- Google Code for Placed Order Conversion Page --> <script type="text/javascript"> <!-- var google_conversion_id = xxxxxxxxxx; var google_conversion_language = "en_US"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "Xxxxxxxxxx"; var google_conversion_value = 0; if (<? echo $order.total ?>) { google_conversion_value =<? echo $order.total ?>; } //--> </script> <script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> ...

I have 2 questions, 1. is $order.total the correct variable for the order total on the thank you page, and for the line
Code:
google_conversion_value =<? echo $order.total ?>;
should there be a ; or no ;? The code snippet on googles page had it without the ; but it wasn't working so I added it. (still doesn't work) but i'm not sure if it is because my variable is wrong or the ;.
Anyone know?
Thanks.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #2  
Old 01-26-2012, 10:16 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: variable for order total

As far as I understand you want this code on the order message page.
If so you should alter the "skin1/customer/main/order_message.tpl" template.

I suppose you can use {$order.total} in the main orders {foreach}

Code:
{foreach from=$orders item=order} ... {$order.total} ... {/foreach}
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:49 AM.

   

 
X-Cart forums © 2001-2020