Forums / Templates, Stylesheets, Page Layout / No images in Product Listing per Category

No images in Product Listing per Category

Locked

Started by t_harrison on 4 Aug 2006, 9:45 PM · Views: 1,639

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
4 Aug 2006, 9:45 PM
#1
t_harrison avatar

t_harrison

New Zenner

Join Date:
Aug 2005
Posts:
16
Plugin Contributions:
0

No images in Product Listing per Category

I read this thread http://zen-cart.com/forum/showthread.php?t=41209 that says there is no way to do this via the Admin, but I really need to be able to not display thumbnails in the Product Listing for a category or 2. The ability to use ZC for this project depends on it. I have PHP experience and have no problem hacking the Product Listing page to do this but I need a point in the right direction.

I'm assuming the mods would need to be done in /modules/product_listing.php? I see 'PRODUCT_LIST_IMAGE' a few times in there but can't quite figure out what the script is doing exactly...

I'm hoping I can get away with a simple:

if ($category_id != 5) {
do display thumbnail column
}

Does that make sense? If I need to explain further, please let me know.

4 Aug 2006, 11:14 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: No images in Product Listing per Category

I think you have the right general idea. The listing display is built fundamentally either using or not using an image, and will want to display the number of elements set in the db. You may be able to fool it by using your test to skip the code inside the PRODUCT_LIST_IMAGE cases for heading and list item, though that might give a blank space or leave the code looking for another element to display.

I think the best method would be to find & snip out or reset the part of the db-derived array/variable that calls for image display, if the category meets your test. Unfortunately, I don't know the mechanics of that well enough to help and don't have time to look more now.

Good luck!

5 Aug 2006, 2:08 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: No images in Product Listing per Category

One thing to be aware of is that the image should not show when a Product is in a given categories_id ...

What happens when doing a search? And the Product is in 2 Categories ... should the master_categories_id be used in this case as you cannot know the Category on a search or manufactuer filter etc.

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

7 Aug 2006, 5:52 PM
#4
t_harrison avatar

t_harrison

New Zenner

Join Date:
Aug 2005
Posts:
16
Plugin Contributions:
0

Re: No images in Product Listing per Category

gjh42:

I think the best method would be to find & snip out or reset the part of the db-derived array/variable that calls for image display

That actually sounds ideal. Any idea where this code might be located? I could prob just modify the SQL query and get the job done.

7 Aug 2006, 6:43 PM
#5
t_harrison avatar

t_harrison

New Zenner

Join Date:
Aug 2005
Posts:
16
Plugin Contributions:
0

Re: No images in Product Listing per Category

Well, so far this is working:

product_listing.php:
if ($listing->fields['master_categories_id'] == 7) {
array_shift($column_list);
}

default_filter.php (line 68) add to the SQL query:
, p.master_categories_id

Anybody see any potential issues with this?

8 Aug 2006, 12:43 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: No images in Product Listing per Category

By default, the master_categories_id is not part of the product_listing ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!