thomask
01-29-10, 01:36 PM
Welcome.
We use web20cart as order template and we use google adwords. We have google conversion script at the end of the complete.tpl file but there's small problem with amount of order.
/ We'd like to use conversion when pro-forma invoice is generated, not when client makes payment so we don't want to have this code between {ifpad} at the middle of complete.tpl file /
Our complete.tpl file looks like this: (in this case conversion works correct with stable value=1)
<link rel="stylesheet" type="text/css" href="templates/orderforms/web20cart/style.css" />
<h2>{$LANG.orderconfirmation}</h2>
<p>{$LANG.orderreceived}</p>
<div class="cartbox">
<p align="center"><strong>{$LANG.ordernumberis} {$ordernumber}</strong></p>
</div>
<p>{$LANG.orderfinalinstructions}</p>
{if $invoiceid && !$ispaid}
<div class="errorbox">{$LANG.ordercompletebutnotpaid}</div>
<p align="center"><a href="viewinvoice.php?id={$invoiceid}" target="_blank">Faktura pro forma {$invoiceid}</a></p>
{/if}
{if $ispaid}
<!-- Enter any HTML code which needs to be displayed once a user has completed the checkout of their order here - for example conversion tracking and affiliate tracking scripts -->
{/if}
<p align="center"><a href="clientarea.php">{$LANG.ordergotoclientarea}</a></p>
{literal}
<!-- Google Code for Zakup Conversion Page -->
<script type="text/javascript">
<!--
var google_conversion_id = XXXXXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXXXXXXXXXX";
var google_conversion_value = 1;
//-->
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
{/literal}
The problem is when we'd like to use variable $amount, whole script just doesn't work.
We tried with {php}{/php} {html}{/html} where the var $amount is, nothing helps.
Any idea how to solve this problem?
<link rel="stylesheet" type="text/css" href="templates/orderforms/web20cart/style.css" />
<h2>{$LANG.orderconfirmation}</h2>
<p>{$LANG.orderreceived}</p>
<div class="cartbox">
<p align="center"><strong>{$LANG.ordernumberis} {$ordernumber}</strong></p>
</div>
<p>{$LANG.orderfinalinstructions}</p>
{if $invoiceid && !$ispaid}
<div class="errorbox">{$LANG.ordercompletebutnotpaid}</div>
<p align="center"><a href="viewinvoice.php?id={$invoiceid}" target="_blank">Faktura pro forma {$invoiceid}</a></p>
{/if}
{if $ispaid}
<!-- Enter any HTML code which needs to be displayed once a user has completed the checkout of their order here - for example conversion tracking and affiliate tracking scripts -->
{/if}
<p align="center"><a href="clientarea.php">{$LANG.ordergotoclientarea}</a></p>
{literal}
<!-- Google Code for Zakup Conversion Page -->
<script type="text/javascript">
<!--
var google_conversion_id = XXXXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXXXXXXX";
var google_conversion_value = 1;
if $amount {
google_conversion_value = {$amount};
}
//-->
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt=""
src="http://www.googleadservices.com/pagead/conversion/XXXXXXXXXXX/?value={$amount}&label=XXXXXXXXXXXX&guid=ON&script =0"/>
</div>
</noscript>
{/literal}
We use web20cart as order template and we use google adwords. We have google conversion script at the end of the complete.tpl file but there's small problem with amount of order.
/ We'd like to use conversion when pro-forma invoice is generated, not when client makes payment so we don't want to have this code between {ifpad} at the middle of complete.tpl file /
Our complete.tpl file looks like this: (in this case conversion works correct with stable value=1)
<link rel="stylesheet" type="text/css" href="templates/orderforms/web20cart/style.css" />
<h2>{$LANG.orderconfirmation}</h2>
<p>{$LANG.orderreceived}</p>
<div class="cartbox">
<p align="center"><strong>{$LANG.ordernumberis} {$ordernumber}</strong></p>
</div>
<p>{$LANG.orderfinalinstructions}</p>
{if $invoiceid && !$ispaid}
<div class="errorbox">{$LANG.ordercompletebutnotpaid}</div>
<p align="center"><a href="viewinvoice.php?id={$invoiceid}" target="_blank">Faktura pro forma {$invoiceid}</a></p>
{/if}
{if $ispaid}
<!-- Enter any HTML code which needs to be displayed once a user has completed the checkout of their order here - for example conversion tracking and affiliate tracking scripts -->
{/if}
<p align="center"><a href="clientarea.php">{$LANG.ordergotoclientarea}</a></p>
{literal}
<!-- Google Code for Zakup Conversion Page -->
<script type="text/javascript">
<!--
var google_conversion_id = XXXXXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXXXXXXXXXX";
var google_conversion_value = 1;
//-->
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
{/literal}
The problem is when we'd like to use variable $amount, whole script just doesn't work.
We tried with {php}{/php} {html}{/html} where the var $amount is, nothing helps.
Any idea how to solve this problem?
<link rel="stylesheet" type="text/css" href="templates/orderforms/web20cart/style.css" />
<h2>{$LANG.orderconfirmation}</h2>
<p>{$LANG.orderreceived}</p>
<div class="cartbox">
<p align="center"><strong>{$LANG.ordernumberis} {$ordernumber}</strong></p>
</div>
<p>{$LANG.orderfinalinstructions}</p>
{if $invoiceid && !$ispaid}
<div class="errorbox">{$LANG.ordercompletebutnotpaid}</div>
<p align="center"><a href="viewinvoice.php?id={$invoiceid}" target="_blank">Faktura pro forma {$invoiceid}</a></p>
{/if}
{if $ispaid}
<!-- Enter any HTML code which needs to be displayed once a user has completed the checkout of their order here - for example conversion tracking and affiliate tracking scripts -->
{/if}
<p align="center"><a href="clientarea.php">{$LANG.ordergotoclientarea}</a></p>
{literal}
<!-- Google Code for Zakup Conversion Page -->
<script type="text/javascript">
<!--
var google_conversion_id = XXXXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "XXXXXXXXXXX";
var google_conversion_value = 1;
if $amount {
google_conversion_value = {$amount};
}
//-->
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt=""
src="http://www.googleadservices.com/pagead/conversion/XXXXXXXXXXX/?value={$amount}&label=XXXXXXXXXXXX&guid=ON&script =0"/>
</div>
</noscript>
{/literal}