If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Your Zen Cart Products / Setting Up Categories, Products, Attributes / Disable product images in just one category?

Disable product images in just one category?

Locked

Started by dimar on 8 Jul 2008, 12:37 PM · Views: 2,419

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
8 Jul 2008, 12:37 PM
#1
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Post #1 by dimar

Hello everyone,

I was wondering if it would be possible to disable the images in the product list in a single category. I would like to have other categories that should still display the images.

Is this possible??

Thanks for your reply!
DMR

8 Jul 2008, 1:46 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Post #2 by fairestcape

This may be possible by using a customised stylesheet for the category where you don't want images. In your zencart css folder(s) you will see a readme file. This tells you how to set up a category-specific CSS file.

I don't know what CSS commands you will have to edit, but if you find the ones that control product images, you could probably use the CSS command "display: none; " to stop the imaged appearing.

8 Jul 2008, 1:59 PM
#3
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Post #3 by dimar

Thanks for the quick reply! I found this in the stylesheet.css file: (line 492)

/*Image Display*/
#productMainImage, #reviewsInfoDefaultProductImage, #productReviewsDefaultProductImage, #reviewWriteMainImage {
 margin: 0em 1em 1em 0em ;
 }

Could that be the class to use (productMainImage)?

And after this, where to put it? I found in that readme file:

  c_??_??.css   // changes to all info pages in a category

Isn't that just the text that comes above the product listing? how would I name this file? where do I put it?

Thanks for any help!
DMR

8 Jul 2008, 9:00 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Post #4 by fairestcape

c_??_??.css

This means that you change the ?? for the category ID numbers of the relevant category.

Easiest way to see the category ID's is to open up that category that you want the stylesheet for - and look at your browser address bar. You'll see something like:-

http://www.yourwebsite.com/index.php?main_page=index&cPath=2_9

the "2_9" are the category ID numbers, where 2 is the upper-level category, and 9 is the relevant sub-category below it.

If your categories are THREE levels deep, you will see something like:

index.php?main_page=index&cPath=12_19_25

Now, just create a CSS file called c_2_9.css (use your cat ID numbers) or c_12_19_25.css (three levels deep).

Now, in that css file, type in:-

/Image Display/
#productMainImage, #reviewsInfoDefaultProductImage, #productReviewsDefaultProductImage, #reviewWriteMainImage {
display: none;
}

save it and load into your css folder.

You may have to tweak the style classes and ID's (#.....Image) to get your desired effect.

10 Jul 2008, 1:42 PM
#5
dimar avatar

dimar

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Post #5 by dimar

Thanks a million! Sorry for the late response, but wanted to solve it first (had the wrong css-class first). If anyone ever wants to do the same:

make a css-file named c_??.css (?? stands for the path, look at this topic for info) and put the following in there:

/**
 * CSS remove Images in product listing
 
 */
.productListing-heading {
display:none; 
}
 
 .listingProductImage {
 display: none;
 }

The productlisting-heading is to remove the titles above (mine is dutch, but it's something like "product image" or something)

Bare in mind that I did this with the red-passion template and therefore placed it in that css-folder. So if you have a template installed, place it in the corresponding css-folder.

Thanks again for the help, hope anyone else can use this as well!
DMR