idamarco Posted December 1, 2009 Posted December 1, 2009 Hello, I have a javascript who works well in my info product file. I would like to include it in the product list file. Can you help me to do it? This is the javascript from the info product file: <!-- // Modif de popup image //--> <script language="javascript" type="text/javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } function popupXL2(of) { var xlContStyle = document.getElementById('xlCont').style xlContStyle.display='block'; if (of && document.getElementById('xlImg').height > 400) { with (xlContStyle) { height='400px'; width=(parseInt(document.getElementById('xlImg').width) + 20) + 'px'; overflow='auto' } } } //--></script> <style type="text/css"> <!-- #xlCont { display:none; top:70px; left:500px; position:absolute; background:#B9BAC1; border:8px solid #B9BAC1; z-index:200; font-size: 10px; } --> </style> <?php echo '<a href="javascript:popupXL2(false);">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> <div id="xlCont" style="display:none"><a href="javascript:void(0)" onclick="document.getElementById('xlCont').style.display='none'"> <?php echo '<div style="text-align: right;"><img alt="Fermeture" src="/images/perso/bout_ferm.png"></div>'; echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], $width, $height, 'class="infoBox_image" id="xlImg"'); ?> </a> <?php echo '<br><div style="text-align: left;">'. $product_info['products_description'].'</div><div style="text-align: right;"><div style="font-size: 14px;">'. $product_info['products_price'].' € </div></div>' ?> </div> <?php /* <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> */ ?> <!-- // Fin Modif de popup image //--> I suppose that it must be includ on this part, but not sure...: case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> '; } Quote Sorry for my bad english... ;) Configuration: Vista Service pack 1 OVH OSC=V2.2 RC1 mail @laposte.net Réglé en smpt Contrib: Colissimo
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.