In the product description text I want to use a link which will open a popup window using javascript.
The content of this window is a flash swf hosted offsite (it contains up-to-the-minute product information). There are two swf files that I want to be be retrieved, depending on the language selected at the time as I have a dual language shop.
As far as I understand I cannot link directly to the swf file, I need to embed it in some html to ensure it is handled properly by browsers without flash.
I have the popup working ok linking directly to a html file in my shop root.
But I know it should not live there but in hereHTML Code:<a href="javascript:popupWindow(\'define_ht_product_advisor_es.html\')">Product Advisor</a>
So, I make a new file\includes\languages\english\html_includes\my_template folder
with this in it\includes\extra_datafiles\define_custom_filenames.php
and inPHP Code:<?php
define(‘FILENAME_DEFINE_HT_PRODUCT_ADVISOR’, ‘define_ht_product_advisor’);
?>
I put\includes\modules\pages\product_info\header_php.php
and if I test this using the $define_page variable in the template somewhere it gets loaded with the correct path ok.Code:$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_HT_PRODUCT_ADVISOR, 'false');
The problem is how to use this in the javascript in the product description.
Using this in the description:
gets stored and used literally so the html output to the browser is<a href="javascript:popupWindow(\'<?php echo $define_page ?>\')">Product Advisor</a>
So how should I be approaching this?HTML Code:<a href="javascript:popupWindow('<?php echo $define_page ?>')">Product Advisor</a>
thanks
Steve



