Forums / Templates, Stylesheets, Page Layout / Different image for product listing page

Different image for product listing page

Started by thebigkick on 28 Jun 2012, 6:07 PM · Views: 1,377

Results 1 to 6 of 6
28 Jun 2012, 6:07 PM
#1
thebigkick avatar

thebigkick

New Zenner

Join Date:
Jan 2012
Location:
Montreal
Posts:
84
Plugin Contributions:
0

Different image for product listing page

Is it possible to display a different product image on the products listing page than the product info page?

My employer wants to show Image A in the product listing. Then when that product is clicked on the product info page shows Image B, and Image A as the secondary image.

I told him that would require some PHP coding that would take me at least a few days to get right on our test server.

I'm pretty sure that I'm correct on this one.

29 Jun 2012, 4:15 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Different image for product listing page

Zen Cart supports 3 image formats:

a) main thumbnail - shown in categorized listing of products and all sideboxes
b) "medium" image - the main product image on the product_info page
c) "large" images - large versions of the thumbnails

plus "additional images" based on filename pattern matching, in both thumbnail and "large" sizes.

So, yes, if you want to use a different image for medium and/or large, you certainly may.

See: http://www.zen-cart.com/content.php?100-multiple-images

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jun 2012, 6:59 PM
#3
thebigkick avatar

thebigkick

New Zenner

Join Date:
Jan 2012
Location:
Montreal
Posts:
84
Plugin Contributions:
0

Re: Different image for product listing page

So the Category listing page uses the main image as the thumbnail. This is the image that is uploaded when creating a new product. If I want to show a different image on the product page I'd have to FTP the image with the _MED suffix.

But first, I'd have to go into the Admin and set the product page to look for images with _MED suffix?

I hope this makes sense because I'm a little confused. Writing it all out helps me understand a little better.

29 Jun 2012, 8:02 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,120
Plugin Contributions:
56

Re: Different image for product listing page

Let's say you have set your product to use the image named xyzzy.jpg and that you haven't made changes to your image suffixes via your admin's Configuration->Images. What DrByte told you is that you can FTP your "different" image to xyzzy_MED.jpg and xyzzy_LRG.jpg and those "different" images will be used as the product's main image files when the product is viewed on its product_info page.

30 Jun 2012, 12:01 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Different image for product listing page

Like the FAQ article says:

Thumbnail: /images/abc.jpg
Prod Info: /images/medium/abc_MED.jpg
Large: /images/large/abc_LRG.jpg

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Jul 2012, 4:04 PM
#6
thebigkick avatar

thebigkick

New Zenner

Join Date:
Jan 2012
Location:
Montreal
Posts:
84
Plugin Contributions:
0

Re: Different image for product listing page

lat9:

What DrByte told you is that you can FTP your "different" image to xyzzy_MED.jpg and xyzzy_LRG.jpg and those "different" images will be used as the product's main image files when the product is viewed on its product_info page.

Didn't happen. Maybe my settings are wrong.

For Product with model number 123456:
123456.jpg - uploaded via Admin where product is created
123456_MED.jpg - FTP to /images/medium
123456_LRG.jpg - FTP to /images/large

Result:
123456.jpg is used for Product Listing thumb
123456_MED.jpg is used when Hover over on Product Listing page.

123456.jpg is used for main product image on product page
123456.jpg is used for large IHv3 when clicked.

So I moved the 123456_MED.jpg and 123456_LRG.jpg to the main /images/ directory and the main image on the product page is 123456.jpg, the second image is 123456_LRG.jpg.

Not exactly the result I'm looking for. Could I achieve what I'm trying to do in Image Handler?
Thanks for the help .

Here is a screeny of my config > images: