I would like to add a dynamic remarketing tag to the View.phtml file. I'm using this code:
<?php $_product = Mage::registry('current_product');?>
<?php if ($_product && $_product->getId()): ?>
<script type="text/javascript">
var google_tag_params = {
ecomm_prodid: '<?php echo $_product->getSku(); ?>',
ecomm_pagetype: 'product',
ecomm_totalvalue: '<?php echo $_product->getfinalprice(); ?>',
}
</script>
This code occupies lines 182
to 190
of my View.phtml
file.
When I insert the code into the file, I get the following error message
"Parse Error: syntax error, unexpected $end in (pathfile for view.phtml file) on line 190"
But line 190
is only occupied by the </script>
tag
I cannot see any bracket or parenthesis missing or showing up where it shouldn't.
Can somebody please point out to me where the error could be.
I think the last ',' is involved.
Try: