If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Adding JQuery Lightbox to additional images

Adding JQuery Lightbox to additional images

Locked

Started by chillout_buddha on 7 Apr 2009, 3:43 AM · Views: 4,646

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
7 Apr 2009, 3:43 AM
#1
chillout_buddha avatar

chillout_buddha

New Zenner

Join Date:
Jan 2006
Posts:
44
Plugin Contributions:
0

Adding JQuery Lightbox to additional images

I am trying to add jquery lightbox (http://code.google.com/p/jquery-lightbox/) to additional images on my shopping cart. I followed all the instructions in here: http://warren.mesozen.com/jquery-lightbox/ but the lightbox is not working. The .js and .css files are correctly included on the <head> section. For implementing the lightbox, I modified the code in includes/modules/MYTEMPLATE/additional_images.php like the following:

$script_link = '<a href="'.$products_image_large.'" rel="lightbox[images]">'.$thumb_slashes.'</a>';

I have seen the lightbox modules on download section. They seem to have lot more modifications in them. I am just trying to see if there is a simple way of doing it as shown on the above URLs.

If anyone has successfully implemented it on zencart, pls let me know.

Cheers!

8 Apr 2009, 1:45 AM
#2
chillout_buddha avatar

chillout_buddha

New Zenner

Join Date:
Jan 2006
Posts:
44
Plugin Contributions:
0

Re: Adding JQuery Lightbox to additional images

I got it working now. I forgot to include a piece of javascript. My own fault...

Just included the following code within the <head> section of includes/templates/MYTEMPLATE/common/html_header.php:

<script> $(document).ready(function(){ $(".lightbox").lightbox(); }); </script>
8 Apr 2009, 1:49 AM
#3
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Adding JQuery Lightbox to additional images

Well, what the modules try to do is:

  1. make sure that only a limited of files are altered
  2. make sure the css and js only loaded on appropriate pages only (loaded only when needed)
  3. flexibility (make sure the lightbox can be turned on on many pages (or product types)

Anyhow, glad you got it worked out for you

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me