Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

gallery-effect in the ecommerce-module


Reply

7 Posts   1798 Views

Avatar
fritzkopf

6 August 2009 at 10:23pm Community Member, 10 Posts

hi guys,

ive got a problem.

i use on a website the ecommerce-module and i want to open the product-pictures with lightbox or something like that...

i install the image_gallery-module and included the required files in the page.ss

<link rel="stylesheet" type="text/css" href="/image_gallery/css/ImageGallery.css" />
<link rel="stylesheet" type="text/css" href="/image_gallery/css/lightbox/jquery.lightbox-0.5.css"/>

<% require javascript(jsparty/jquery/jquery.js) %>
<% require javascript(image_gallery/javascript/lightbox/jquery.lightbox-0.5.js) %>
<% require javascript(image_gallery/javascript/lightbox/lightbox_init.js) %>

and in the product.ss-template of the ecommerce-module i use this for the image:

<% if Image.ContentImage %>
<a id="ViewLink-$ID" rel="lightbox" class="lightbox" href="$Image.URL"><img class="productImage" src="$Image.ContentImage.URL" alt="" border="0" /></a>
<% else %>
<img src="ecommerce/images/productPlaceHolderNormal.gif" alt="<% sprintf(_t("NOIMAGE","Sorry, no product image for &quot;%s&quot;"),$Title) %>" />
<% end_if %>

the problem is... the picture do not open with lightbox and i dont know what the error is...

can someone help me?

here is the url: http://www.reimer-ministries.com/die-welt-umarmen/
i want to open the picture on the left site....

thank you for helping me...

fritzkopf

Avatar
fritzkopf

12 August 2009 at 6:23pm Community Member, 10 Posts

nobody????????

Avatar
banal

12 August 2009 at 7:28pm Community Member, 901 Posts

Modify your lightbox_init.js script from:

$(function() {$('a.lightbox').lightBox();});

to:

jQuery(function(){ jQuery('a.lightbox').lightbox(); });

You might have a jQuery <> Prototype conflict there.

Avatar
fritzkopf

12 August 2009 at 9:32pm Community Member, 10 Posts

hi banal...

thank you for you help...

but this doesn´t work, too...

the firebug say: jQuery("a.lightbox").lightbox is not a function

Avatar
banal

12 August 2009 at 10:07pm (Last edited: 12 August 2009 10:07pm), Community Member, 901 Posts

I'm sorry, you seem to use a different Version of jQuery Lightbox.
I thought you were using this: http://github.com/krewenki/jquery-lightbox/ which requires you to call .lightbox();

In your case, it seems like you have to write:

jQuery(function(){ jQuery('a.lightbox').lightBox(); });

Avatar
fritzkopf

13 August 2009 at 12:30am Community Member, 10 Posts

hey banal:

this is the same code like before... LOL...

Avatar
fritzkopf

13 August 2009 at 12:42am Community Member, 10 Posts

ok...that was the right code !!!

THANK YOU!!!!! IT WORKS !!!!!!!!