Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.

Images for some products and not for others

Locked

Started by enquirer66 on 11 Mar 2009, 4:06 PM · Views: 842

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
11 Mar 2009, 4:06 PM
#1
enquirer66 avatar

enquirer66

Zen Follower

Join Date:
Sep 2007
Posts:
215
Plugin Contributions:
0

Post #1 by enquirer66

version 1.3.8
Is there a way to install some images for some of the products but have another category of product which have no images at all?

11 Mar 2009, 6:09 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #2 by schoolboy

Not quite sure what you mean here...

Do you want a specific product to have an image in one category, but not in another?

... or do you want some products to have images and different products NOT to have images?

If the latter... then just don't upload any images with the product data...

If the former - not sure if this can be achieved with php, but you may be able to create a CATEGORY SPECIFIC STYLESHEET* that contains the declaration:-

.listingProductImage, #productMainImage {
 display: none;
 }

*Category-specific stylesheet "how-to" is explained in the README file in a default css folder...

(Possibly a good idea to have this category-specific stylesheet anyway - as it will prevent the blank links appearing too.)

20 years a Zencart User

12 Mar 2009, 8:39 AM
#3
enquirer66 avatar

enquirer66

Zen Follower

Join Date:
Sep 2007
Posts:
215
Plugin Contributions:
0

Post #3 by enquirer66

Thanks. I mean that I want some products to have images and others not, but I don't want the large gif which shows 'no image available' to pop up. For example, say I have two categories - pens and envelopes. I want the shop to show the images I've uploaded for the pens but I don't want any images for the envelopes. Hope this is clearer.

12 Mar 2009, 9:00 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #4 by schoolboy

You could also consider creating a transparent gif (transparent.gif) and loading this into your images folder.

Then for every product where you do not want an image, state its image as: "transparent.gif".

To be sure that you don't get any text linkings that can appear, (such as to "larger image"), you must also then create the category-specific stylesheet and apply the declaration I suggest above.

20 years a Zencart User