Image Gallery

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
Post Reply
User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Image Gallery

Post by mazhar » Fri Nov 21, 2008 1:35 pm

This user control can be used for showing the product images or images from a folder. Available images will be listed as thumbnail at bottom of the control. Clicking upon any thumbnail will open the large version of the image. You can change the styles etc to meet your needs.

Installation

The package contains three files. Place the ImageGallery.ascx or user control file in the conlib. Place the Gallery.css file in your current store theme. Finally place the mootools1.2.js on your website root.

Configurations

You can use control to either list product additional imges or to show images from some folder. By default the control shows the product images. In order to show the product images place control on some page where product id is available, for example you can place it on the product details page. You can also specify the description for the images. In order to support the description the control uses the alt text. On the AbleCommerce admin you can specify the alt text for the images and control will show it as description. Currently you can provide a text up to 100 characters for alt text. If you want to increase this you can change the maximum text limit on the alt field in ac_ProductImages table of the database.

Control supports two properties

1)- ProductMode
This is of boolean type. By default its set to true. If you want to list the images from some folder set it to false.

2)- GalleryPath
This is of string type. By default the path is Assets/Gallery/. You can change it your custom path on server. This setting is depending upon the ProductMode. First set the ProductMode=false and then set the path.

Screen Shots

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Image Gallery

Post by Jaz » Fri Nov 21, 2008 6:40 pm

I can’t thank you enough. This totally solved my problems. I think this gallery will be a big help to all. You also managed to solve the problem that the original gallery, in that it would not allow html in the Alt tag.

Now just to be picky. How would you set it so the page loads with the first large image active?
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Fri Nov 21, 2008 11:55 pm

How would you set it so the page loads with the first large image active?
This could be done through some JavaScript statements. This change will update the user control file. Here is the updated ImageGallery.ascx file.

alkasber
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 36
Joined: Thu May 15, 2008 2:50 pm
Location: Brazil

Re: Image Gallery

Post by alkasber » Sun Nov 23, 2008 8:59 am

Hello Mahzar,

I installed the files following your instructions but how I make it works? I just want it to replace the standard MORE IMAGES gallery, what I have to do?

Here is the code to MORE IMAGES in the Show Product 1 Content:

Code: Select all

#if($Product.Images.Count > 0)
<a href="#" onclick="window.open('ProductImages.aspx?ProductId=$Product.ProductId', 'productImages', 'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=yes,scrollbars=1,height=650,width=850')">
More Images
Can someone show me where to change to replace the standard More Images Gallery?

Thanks

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Image Gallery

Post by Jaz » Mon Nov 24, 2008 4:20 am

Thanks, that worked great. this image comes right up. I just noticed 2 small differences from how the origional gallery worked. First there seems top be something wrong with the fase of the main image. The background does the fading, not the image. This is not a huge problem. I just changed the fade colors to black to disable the fade.

The other difference is that on the origional Galleria, the thumbnails would go to the next line if there were too many of them. On this one, they go off the page.

Thanks,
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Mon Nov 24, 2008 4:39 am

Hello Mahzar,

I installed the files following your instructions but how I make it works? I just want it to replace the standard MORE IMAGES gallery, what I have to do?

Here is the code to MORE IMAGES in the Show Product 1 Content:

Code:
#if($Product.Images.Count > 0)
<a href="#" onclick="window.open('ProductImages.aspx?ProductId=$Product.ProductId', 'productImages', 'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=yes,scrollbars=1,height=650,width=850')">
More Images


Can someone show me where to change to replace the standard More Images Gallery?

Thanks
In order to make this control show the product images, you can just add it in the show product 1 scriptlet and it will list the additional products. If you want to replace the more image gallery with this one then there are two possiablities just use the control in show product 1 scriptlet and comment out the lines you mentioned above. The other possibility could be to create a new aspx page for example ImageGallery.aspx and place the user control on it then change the more images code to look like

Code: Select all

#if($Product.Images.Count > 0)
<a href="#" onclick="window.open('ImageGallery.aspx?ProductId=$Product.ProductId', 'productImages', 'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=yes,scrollbars=1,height=650,width=850')">

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Mon Nov 24, 2008 4:51 am

The other difference is that on the origional Galleria, the thumbnails would go to the next line if there were too many of them. On this one, they go off the page.
It seems some cross browser problem. This issue is on IE, FF just works fine.

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Image Gallery

Post by Jaz » Mon Nov 24, 2008 4:52 am

Yea - just saw that. Just can't be easy.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Mon Nov 24, 2008 4:54 am

Here is the fix locate the

Code: Select all

#gallery-items .gallery-item
style in the Gallery.css and change its

Code: Select all

overflow: hidden
style to

Code: Select all

overflow: visible
.

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Image Gallery

Post by Jaz » Mon Nov 24, 2008 5:09 am

Worked Perfect
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Wed Nov 26, 2008 9:48 am

Hello Mahzar,

I installed the files following your instructions but how I make it works? I just want it to replace the standard MORE IMAGES gallery, what I have to do?

Here is the code to MORE IMAGES in the Show Product 1 Content:

Code:
#if($Product.Images.Count > 0)
<a href="#" onclick="window.open('ProductImages.aspx?ProductId=$Product.ProductId', 'productImages', 'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=yes,scrollbars=1,height=650,width=850')">
More Images


Can someone show me where to change to replace the standard More Images Gallery?

Thanks
Have a look at this control as well.
viewtopic.php?f=47&t=9071

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Image Gallery

Post by Jaz » Mon Dec 01, 2008 8:01 am

If anyone is interested, here is an example of it up and running:

http://www.trickconcepts.com/Regular-Fi ... 10C11.aspx
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Mon Dec 01, 2008 8:30 am

If anyone is interested, here is an example of it up and running:

http://www.trickconcepts.com/Regular-Fi ... 10C11.aspx
Thanks for the link David. The live example is great.

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Image Gallery

Post by Logan Rhodehamel » Mon Dec 08, 2008 3:44 pm

Is anyone from this thread interested in trying an alternative image gallery? If so, check the thread I posted here: viewtopic.php?f=42&t=9200
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Thu Apr 30, 2009 5:16 am

IE8 FIX

Problem:-
IE8 is not loading large image when some one clicks on thumbnail image.

Fix:-

Edit ImageGallery.ascx file and locate following code line

Code: Select all

var image = item.getElement('img').clone();
and replace it with following code

Code: Select all

var image = item.getElement('img');
imageUrl = image.get('src');
image = image.clone();
image.set('src',imageUrl);

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Image Gallery

Post by Jaz » Mon May 04, 2009 5:16 pm

Thanks, worked perfect.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Image Gallery

Post by Jaz » Tue Jun 09, 2009 3:01 am

I just noticed that there is still a problem with IE8 and this gallery. The photos all show, but the description only shows for the first image. Here is an example:

http://www.trickconcepts.com/Poison-Fire-Fan-P26C7.aspx
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Tue Jun 09, 2009 10:48 am

Trying to reproduce it on my local setup. I got three images with alternate text and its working great on IE8. Do you have any tip about reproduction case?

User avatar
Jaz
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Nov 05, 2008 4:04 am
Location: Torrance, CA
Contact:

Re: Image Gallery

Post by Jaz » Thu Jun 11, 2009 2:53 am

I have tried to pin down the problem, but I have the same issue on 3 vista machines and on XP machine. I do not have any of them set to run on compatibility mode. I don't have any machines that it works correctly on.
David Jasiewicz
President
Trick Concepts - Metal Fab. Engineering and Product Design
http://www.trickconcepts.com-- If you are an ASP or PHP programmer or CSS web specialist I will gladly trade for graphic design, mechanical engineering or metal fabrication service! --

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Image Gallery

Post by kastnerd » Thu Aug 13, 2009 10:08 am

Thanks, I am trying to tweak this for 800x600 images, But now the pop up window is not tall enough when it first opens. What file controls this size?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Mon Aug 17, 2009 8:07 am

check the CSS file for style on large image.

kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Re: Image Gallery

Post by kastnerd » Mon Aug 31, 2009 8:39 am

I am using this to show larger images of my products. One thing that could be improved is the auto naming of the files. If i upload "Kit.jpg" as the product image. It automaticly names the Icon and Thumbnail. But if I also try and upload Kit.jpg as "Additional Images" I have to manualy change the name so it wont over wright the product image.

missylhale
Ensign (ENS)
Ensign (ENS)
Posts: 3
Joined: Tue Nov 10, 2009 12:40 pm

Re: Image Gallery

Post by missylhale » Wed Nov 11, 2009 7:47 am

I am not getting the basic image first, just the additional images. So if there's not additional images and just basic images I am not getting any image. Am I not doing something right or is that how it is set up. Is there a way to display the basic image first or do I have to set up the first additional image the same as the basic image on each product? Thanks.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Image Gallery

Post by mazhar » Wed Nov 11, 2009 8:11 am

Yes its coded in a way to load additional images only. In order to load basic image you can attach it as first additional image as well.

Post Reply