broadstreetbully Posted November 23, 2012 Posted November 23, 2012 I installed a lightbox addon to make my products image popup using a lightbox but I just figured out the lightbox doesn.t work for any pages other than products info... is there a way to make this code work for product_reviews_info.php as well as product_info.php? I tried myself a few times but couldn't get it right... below are the lightbox instructions I used: How to Install -------------- Open the file Catalog / product_info.php 1-Find <head> tag and add right below it. (Please don't place it after other script including tags or stylesheet links, place it inside the head tag on top) <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <script src="js/prototype.js" type="text/javascript"></script> <script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script> <script src="js/lightbox.js" type="text/javascript"></script> 2-Find this code around line no. 109 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>'; ?>'); Replace it with document.write('<?php echo '<a href="images/' . $product_info['products_image'] . '" rel="lightbox" title="' . $product_info['products_name'] . '">' . 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>'; ?>'); 3-Upload the accompnied folders "css", "js", "images" into your catalog folder. This will not replace any files, just add few css, javascript and image files to your website. That's all you are done.
multimixer Posted November 23, 2012 Posted November 23, 2012 What osCommerce version are you using? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
broadstreetbully Posted November 23, 2012 Author Posted November 23, 2012 What osCommerce version are you using? 2.2rc2a
multimixer Posted November 23, 2012 Posted November 23, 2012 If you want the same on other pages, you need to include the lightbox scripts to that pages too same as for product info Then you need to add a rel="lightbox" to any links you want to open in lightbox My community profile | Template system for osCommerce - New: Responsive | Feedback channel
broadstreetbully Posted November 23, 2012 Author Posted November 23, 2012 If you want the same on other pages, you need to include the lightbox scripts to that pages too same as for product info Then you need to add a rel="lightbox" to any links you want to open in lightbox ...inside the <head></head> tags right?I did that and it wouldn't work...
multimixer Posted November 24, 2012 Posted November 24, 2012 Yes inside the head tags If it "didn't work" then you did something not right What exactly didn't work? Did your link had a rel="lightbox" attached? My community profile | Template system for osCommerce - New: Responsive | Feedback channel
broadstreetbully Posted November 24, 2012 Author Posted November 24, 2012 Yes inside the head tags If it "didn't work" then you did something not right What exactly didn't work? Did your link had a rel="lightbox" attached? I added the correct code...I'm pretty sure it's another javascript that's conflicting with it....
Recommended Posts
Archived
This topic is now archived and is closed to further replies.