Redhead_Elf Posted February 16, 2009 Posted February 16, 2009 Hello, First, I'd like to say this forum is great!!! I had been reading a lot of questions and answers by so many people, and my site had evolved immensely since. My question is : On the reviews pages, when clicking on the product image, it opens a pop-up window of the image - I'd like to cancel that, and instead, place a code that will take the customer to the displayed product. It's much more intuitive, to want to click on he image and see the product as appose to seeing a larger version of it... Thanks a lot to everyone in advance, ;) Red.
Redhead_Elf Posted February 18, 2009 Author Posted February 18, 2009 I looked everywhere for an answer :( I tried everythinggggg I could think of :( Please please, if someone could just guide me to a general direction... I'll do my best figuring it out.
♥geoffreywalton Posted February 18, 2009 Posted February 18, 2009 To state the obvious, you need to change it to a link to the page http://www.w3schools.com/html/html_links.asp It will be along the lines of <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">Click here to see the product</a>'; ?></td> This was carefully stolen & enhanced from the button processing on the same page. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Guest Posted February 18, 2009 Posted February 18, 2009 Don't know if you've tried this or not but I'll do what I can to point you in the right direction. In the product_reviews.php file you'll find on line 179 or so this code: <script language="javascript"><!-- document.write('<?php echo '<a href="java script: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> <noscript> <?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>'; ?> </noscript> You need to take each of those make them link to the product in the same fashion that the back button does: <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a> While still displaying the photo! I just tried like 10 times and I'm not smart enough to get it to work, I did get it to display the product title and link backwards but the product image never did show up. I'm not sure why. I know that's the right direction. I ended up coding in: <script language="javascript"><!-- document.write('<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image']) . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image']) . '</a>'; ?> </noscript> But it didn't show the photo... :angry: LoL your issue drove me nuts too. I KNOW it's right direction but maybe you can figure out the link issue that I couldn't.
Guest Posted February 18, 2009 Posted February 18, 2009 To state the obvious, you need to change it to a link to the page http://www.w3schools.com/html/html_links.asp It will be along the lines of <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">Click here to see the product</a>'; ?></td> This was carefully stolen & enhanced from the button processing on the same page. Your code doesn't do what he wants it to do though. Yes it accomplished the goal of acting like the back button but it does not continue to display the product image as he would like. My attempt did not get what he wants either, maybe you know how to fix my attempt at it. He'd like the product image to remain there and act just like the back button. If all he wanted was the back button he could just remove to product image all together ;)
burt Posted February 18, 2009 Posted February 18, 2009 <?php if (tep_not_null($product_info['products_image'])) { ?> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?> <?php } ?> Should do it.
Redhead_Elf Posted February 18, 2009 Author Posted February 18, 2009 Your code doesn't do what he wants it to do though. Yes it accomplished the goal of acting like the back button but it does not continue to display the product image as he would like. My attempt did not get what he wants either, maybe you know how to fix my attempt at it. He'd like the product image to remain there and act just like the back button. If all he wanted was the back button he could just remove to product image all together ;) I'm no PHP genius - everything I did with my site was done with great help reading forums, contributions, and pure logic to get what I want. To the point - I tried every logical thing I could think of, using existing codes (including the back button) - none of which worked while keeping the image alive. Thanks betatech for your efforts. I appreciate it. Thanks a lot.
Redhead_Elf Posted February 18, 2009 Author Posted February 18, 2009 <?php if (tep_not_null($review['products_image'])) { ?> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $review['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $review['products_image'], addslashes($review['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $review['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $review['products_image'], $review['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> <?php } I'm sorry if I'm off - I don't really know php :blush:
Redhead_Elf Posted February 18, 2009 Author Posted February 18, 2009 Your code doesn't do what he wants it to do though. Yes it accomplished the goal of acting like the back button but it does not continue to display the product image as he would like. My attempt did not get what he wants either, maybe you know how to fix my attempt at it. He'd like the product image to remain there and act just like the back button. If all he wanted was the back button he could just remove to product image all together ;) Okay, I took a code from the product listing IT DOES what it needs too, and shows an "image box" but not the image... It might be the right way... :blush: <?php if (tep_not_null($review['products_image'])) { ?> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?> </noscript> <?php } echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a></p>'; ?>
Redhead_Elf Posted February 18, 2009 Author Posted February 18, 2009 Your code doesn't do what he wants it to do though. Yes it accomplished the goal of acting like the back button but it does not continue to display the product image as he would like. My attempt did not get what he wants either, maybe you know how to fix my attempt at it. He'd like the product image to remain there and act just like the back button. If all he wanted was the back button he could just remove to product image all together ;) IT WORKS FOR MEEEEEEEEEEEEEEEE - THANNKS A LOT Burt AND betatech! I used both of your help!!! <?php if (tep_not_null($review['products_image'])) { ?> <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params()) . '">' . tep_image(DIR_WS_IMAGES . $review['products_image'], $review['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; ?> </noscript> <?php } echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a></p>'; ?>
Guest Posted February 20, 2009 Posted February 20, 2009 No problem, glad to hear it worked out. If that's the right code I think I might take it and save it just in case I need it some time :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.