Forums / General Questions / Additional images and Zen Lightbox

Additional images and Zen Lightbox

Views: 887

Results 1 to 2 of 2
17 Oct 2013, 11:38 AM
#1
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Additional images and Zen Lightbox

Hi
Can anyone help please.
I have an issue with additional images not showing with Zen Lightbox.
I downloaded the additional images module so that images names would not need to be changed. This all seems to be working in the admin area OK.
But the additional images although seen on the web page will not work in Zen Lightbox.
The source code shows that this is not working:

<div id="productMainImage" class="centeredContent back"> <script language="javascript" type="text/javascript"><!-- document.write('<a href="images/sept_1.jpg" rel="lightbox-g" title="MAZDA BONGO 2002 2.0 LTR AERO / DUE SOON FROM JAPAN"><img src="images/sept_1.jpg" alt="MAZDA BONGO 2002 2.0 LTR AERO / DUE SOON FROM JAPAN" title=" MAZDA BONGO 2002 2.0 LTR AERO / DUE SOON FROM JAPAN " width="200" height="200" /><br /><span class="imgLink">larger image</span></a>'); //--></script> <noscript> <a href="http://www.website.com/index.php?main_page=popup_image&pID=281&zenid=ds441d45v3dvflphao9vi70em2" target="_blank"><img src="images/sept_1.jpg" alt="MAZDA BONGO 2002 2.0 LTR AERO / DUE SOON FROM JAPAN" title=" MAZDA BONGO 2002 2.0 LTR AERO / DUE SOON FROM JAPAN " width="200" height="200" /><br /><span class="imgLink">larger image</span></a></noscript> </div> <!--eof Main Product Image--> <!--bof Additional Product Images --> <div id="productAdditionalImages"> <div class="additional-images"><img src="[images/additional/sept\_2.jpg](http://www.zen-cart.com/view-source:http://www.bongobits.com/images/additional/sept_2.jpg)" alt="" width="200" height="150" /></div><br/><div class="additional-images"><img src="[images/additional/sept\_3.jpg](http://www.zen-cart.com/view-source:http://www.bongobits.com/images/additional/sept_3.jpg)" alt="" width="200" height="200" /></div><br/><div class="additional-images"><img src="[images/additional/sept\_4.jpg](http://www.zen-cart.com/view-source:http://www.bongobits.com/images/additional/sept_4.jpg)" alt="" width="200" height="150" /></div><br/><div class="additional-images"><img src="[images/additional/sept\_5.jpg](http://www.zen-cart.com/view-source:http://www.bongobits.com/images/additional/sept_5.jpg)" alt="" width="200" height="150" /></div><br/><div class="additional-images"><img src="[images/additional/sept\_6.jpg](http://www.zen-cart.com/view-source:http://www.bongobits.com/images/additional/sept_6.jpg)" alt="" width="200" height="150" /></div><br/></div> <!--eof Additional Product Images -->

It would appear that the Javascript is not working on the Additional Images. I have searched and tried a few things but have hit a brick wall, any suggestions would be helpful thanks.

6 Nov 2013, 4:30 PM
#2
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: Additional images and Zen Lightbox

Just in case anyone else has the same problem this partially fixed the problem. The additional images now show in Lightbox but the next and previous buttons are not working but at least it's workable. Added below to tpl_modules_additional_images.php thanks to Brandon Walters :smile:
require(DIR_WS_MODULES . zen_get_module_directory('additional_images.php'));
?>

<?php if ($additional->RecordCount() > 0) { ?> <div id="productAdditionalImages"> <!-- Fix for broken click to enlarge - Brandon Walters <http://www.bwaltdesigns.com> --> <?php while(!$additional->EOF) { echo '<div class="additional-images"><a href="images/' .$additional->fields['additional_image']. '" rel="lightbox">'.zen_image(DIR_WS_IMAGES . $additional->fields['additional_image'], '', ADDITIONAL_SMALL_IMAGE_WIDTH, ADDITIONAL_SMALL_IMAGE_HEIGHT).'</a></div><br/>'; $additional->MoveNext(); } ?> </div> <?php } ?>