I am working on a Joomla(1.5.14)/Virtuemart(1.1.3) website and I have run into a problem implementing some AdWords code snippets due to being unable to use PHP in the Category Description areas in Virtuemart.
This is what I wanted to achieve.
I have the main AdWords snippet in the main 'index.php' file for the website as follows:
<?php if ($HideAdWords != "yes") : ?>
<!-- Google Code for Every user Remarketing List -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = ###;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "666666";
var google_conversion_label = "###";
var google_conversion_value = 0;
/* ]]> */
</script>
<?php if ($_SERVER['HTTPS']) { ?>
<script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js">
<?php } else { ?>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
<?php }?>
</script>
<noscript>
<div style="display:inline;">
<!--<img height="1" width="1" style="border-style:none;" alt="" src="###"/>-->
</div>
</noscript>
<?php endif; ?>
On certain pages I included a different AdWords code along with the following PHP snippet, wanting to remove the original piece of code from the page when browsing this page:
<?php
$HideAdWords = "yes";
?>
This did do what I wanted it to however on most of the pages I need to apply this I am not able to use PHP, when entering PHP into a category description in Virtuemart, upon saving changes it comments out any PHP code and makes it useless.
I have tried searching as much as I can, and tried the Joomla/Virtuemart specific websites/forums. I managed to get JavaScript working in these category description areas so I was wondering if maybe I can replicate this effect with JavaScript or maybe you guys can think of a better solution?
I hope I have been clear, any help would be really appreciated.
Kind Regards.
*edit: fixed unspecific title.