| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
What to do when basic {literal} not enough? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() In order to track pay-per-click performance, I need to include a revised version of the following JS snippet somewhere in the order process. I assume the right file is /customer/main/order_message.tpl (if I am wrong, please correct me).
Code:
In the script above, I have to somehow substitute {$subtotal} for ORDER_SUBTOTAL and {$order.orderid} for ORDER_NUMBER. I tried the following, and it broke the ordering process: Code:
I'm guessing that embedding the {literal} tag within a javascript {tag} is a no-go. Can someone offer an alternative approach? Thanks |
|||||||
#2
|
|||||||
|
|||||||
![]() {literal} <script language="JavaScript" type="text/javascript" src="https://www.trackhelp.com/bin/ctrack.php"></script> <script language="JavaScript" type="text/javascript"> <!-- var siteid = 1626; var proto = 'https'; if (typeof(valid) + '' != 'undefined') {tlitrack(3,{$subtotal},{$order.orderid});} //--> </script> {/literal} I would imagine the above would work - but can't remember if "{literal}" makes smarty tags non-interpreted. I'd say the main problem you have is that {tlitrack already begins with { - so therefore trying to put your smarty variable in there will break it - 2 sets of those brackets prolly isn't good. Instinctual Colorado X-Cart Versions 3.5.x - 4.0.6 |
|||||||
#3
|
|||||||||
|
|||||||||
![]() {rdelim} and {ldelim} should work OK in this instance:
Code:
__________________
joshf | X-Cart Portfolio Currently: http://nightowlpapergoods.com | http://pinkolive.com |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|