paulm2003 Posted December 11, 2003 Posted December 11, 2003 Hi, I am working on a simple "improved image popups" contribution, now I need to open a page in a new window without loosing the session info if possible. I would like to use target="_blank" combined with the tep_href_link () function. Probably easy or "impossible", but I am a still bit new to PHP so I am not sure if/how it should be done. Any ideas welcome (even only knowing if it is possible would help a lot) Paul
Noobish-n-stuff Posted December 11, 2003 Posted December 11, 2003 i can't say i've ever seen that use before. chances are, there is another way around what you are trying to do. if you need help, let me know.
moonstone Posted December 11, 2003 Posted December 11, 2003 Consider this line in product_info.php: <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> This should be what you are looking for. Try to see if you can digest this. Let me know if you need help.
paulm2003 Posted December 11, 2003 Author Posted December 11, 2003 Wow fast reply! i can't say i've ever seen that use before Maybe it sounds strange what I want so I explain a bit more: If someone only has the image popup window opened, I want a link to the product in the shop, that part works, no problem. But if a costumer already has a "shop window" open, and clicks on that same link I don't want him to loose the session info. (Hiding the link if a session already is opened would be ok to, then I would need to detect if a session is opened somehow?) Hope this explains what I am looking for, Thanks
paulm2003 Posted December 11, 2003 Author Posted December 11, 2003 Consider this line in product_info.php: <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> This should be what you are looking for. Try to see if you can digest this. Let me know if you need help. Hi Patrick, that exactly looks like what I needed! Thanks! :D Please ignore my previous post I did not read Patricks yet when I wrote it Paul (That flood control and too many MySQL connections can be a real pain :( sometimes)
paulm2003 Posted December 11, 2003 Author Posted December 11, 2003 Sorry third post in a row and even quoting myself :rolleyes: will a be banned now? If someone only has the image popup window opened, I want a link to the product in the shop, that part works, no problem. But if a costumer already has a "shop window" open, and clicks on that same link I don't want him to loose the session info. Noticed a strange thing: it does not happen! I tried IE and Mozilla, totally disabled all cookies, when I go to a shop page without "tep_href_link" links the cart is empty after I click the link, as expected. But when I click the "non tep_href_link" in the popup box the cart is still full! (even if I close all windows but the popup) It isn't a problem, but I would like to understand why, does anybody have an explanation for this strange behaviour?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.