Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Additional Images on Product Listing Page

Additional Images on Product Listing Page

Views: 1,853

Results 1 to 20 of 22
16 Apr 2012, 6:10 PM
#1
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Additional Images on Product Listing Page

Can it be done?

Has anyone accomplished it?

Accomplished it "Where the stock additional images are accessed purely through analysis of the base image name and matching file names from within the /images/ folders without trading (filename matching for db lookups)"

If not, does anyone have any pointers or direction?

17 Apr 2012, 1:10 PM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

I noticed this has never been successfully accomplished or it has and solutions not posted on the forum.

I have (sorta) accomplished getting a products additional images on the product listing page using the base image name and matching file names.

I have tested it with 4 products -

product 1 has 0 additional images
product 2 has 1 additional images
product 3 has 2 additional images
product 4 has 3 additional images

All additional images show but it breaks with 1 & 2 additional images.

simply merged the additional_images.php file with the product_listing.php file

did away with the col & row code and used a CSS rule to display inline

SEE IT HERE - any ideas

17 Apr 2012, 5:17 PM
#3
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

OK - I think I am getting somewhere, everything works fine if each product has the same amount of Additional Images

Any Ideas, Anybody!

23 Apr 2012, 1:43 PM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

I figured it out -

23 Apr 2012, 2:47 PM
#5
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Additional Images on Product Listing Page

Remember this will affect the way Google spiders your page. Google spiders around 100 links max per page, inbound, outbound combined. When you start having a product listing page, and now adding additional images to it, they all count as links, so one product is now say 5 links in total. Go too far and you can end up with only half a page and its links being spidered.

23 Apr 2012, 2:59 PM
#6
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

thanks for the advice -

actually what you are seeing is just an example (it can be done)

the additional images will be for display purposes only & not links (click-able) on a live site.

24 Apr 2012, 10:34 PM
#7
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

Ok, so...

I got all the images to display correctly
Loop Stops when no image exists
No images return false
No more broken image in Chrome & IE if image doesn't exist

Removed additional image links

Added hover effect

24 Apr 2012, 11:33 PM
#8
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

rbarbour:

Ok, so...

I got all the images to display correctly
Loop Stops when no image exists
No images return false
No more broken image in Chrome & IE if image doesn't exist

Removed additional image links

Added hover effect

Link to SEE

Would like some opinions - would this be a good contribution?

25 Apr 2012, 8:24 AM
#9
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Additional Images on Product Listing Page

Thanks for stealing all my images off of my website....

25 Apr 2012, 8:39 AM
#10
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

just examples of some clothing

I removed

2 Dec 2012, 8:49 PM
#11
coreyalderin avatar

coreyalderin

Zen Follower

Join Date:
May 2012
Posts:
137
Plugin Contributions:
0

Re: Additional Images on Product Listing Page

This sounds exactly like what I am trying to do. Did you get it all to work to your satisfaction? Do you mind sharing?

Thanks
Corey

3 Dec 2012, 5:48 AM
#12
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

I do have this working to my satisfaction. no one ever showed interest so I never packaged it.

Here is the new link to see it working in action.

This was accomplished "Where the stock additional images are accessed purely through analysis of the base image name and matching file names from within the /images/ folders without trading (filename matching for db lookups)

I have an example with just additional images
I have an example with additional images with hover effect
I have an example with just additional images (LIMIT 6)

If this is what your looking for I will try to package it in the near future.

7 Dec 2012, 3:22 AM
#13
coreyalderin avatar

coreyalderin

Zen Follower

Join Date:
May 2012
Posts:
137
Plugin Contributions:
0

Re: Additional Images on Product Listing Page

Thanks for the reply. I guess its not quite what I was looking to do. I am trying to have the image change when you mouse over it.

7 Dec 2012, 4:33 AM
#14
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

easy enough, requires javascript though - I updated the example

7 Dec 2012, 1:22 PM
#15
coreyalderin avatar

coreyalderin

Zen Follower

Join Date:
May 2012
Posts:
137
Plugin Contributions:
0

Re: Additional Images on Product Listing Page

Thats closer, but stil not quite what I am looking for. I still just want 1 picture to show up for each product. Then, when you scroll over it, it will change to a different picture.

7 Dec 2012, 9:56 PM
#16
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

That would involve alot of custom coding - I have never seen it accomplished with zen cart. If I have time in the near future I will play around with it.

10 Dec 2012, 3:39 PM
#18
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,781
Plugin Contributions:
21

Re: Additional Images on Product Listing Page

rbarbour:

That would involve alot of custom coding - I have never seen it accomplished with zen cart. If I have time in the near future I will play around with it.

I've seen it. Actually, I've done it. :cool: Check the JonaMaria site from my sig (for example, Scarves category). Some products are missing the second image, but that's because of the store owner... Plus, it's fully admin-controlled so there's no FTP or image name requirements, you just upload the second image and that's it. It wasn't simple, but it can be done. :smile:

11 Dec 2012, 2:38 AM
#19
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

pretty cool - my images are pulled "Where the stock additional images are accessed purely through analysis of the base image name and matching file names from within the /images/ folders without trading (filename matching for db lookups)"

adding a field on the admin product info page to upload a second image to the database and using css to change image onhover is actually the way to go and very easy to accomplish.

11 Dec 2012, 4:16 AM
#20
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Additional Images on Product Listing Page

rbarbour:

adding a field on the admin product info page to upload a second image to the database and using css to change image onhover is actually the way to go and very easy to accomplish.

However If you wanted to keep it "Where the stock additional images are accessed purely through analysis of the base image name and matching file names from within the /images/ folders without trading (filename matching for db lookups)"

That is very easily accomplished also - I created another test product showing:

  • A main image rollover
  • The rollover image being accessed purely through analysis of the base image name and matching file names
  • LIMIT 1

So you could simply use the 1st additional image as your rollover image ABC.gif (main image), ABC_01.gif (1st additional image) and ABC_02.gif, ABC_03.gif & ABC_04.gif are ignored.

Check it out!