Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Categories Image on Manufacturer page

Categories Image on Manufacturer page

Views: 1,674

Results 1 to 15 of 15
4 May 2011, 5:09 PM
#1
elena1707 avatar

elena1707

New Zenner

Join Date:
Apr 2011
Posts:
8
Plugin Contributions:
0

Categories Image on Manufacturer page

Hi everyone,

I am sort of new to this, so bare with me.
I am trying to have a subcategory image show up on a manufacturer's page after a category was selected from a drop-down filter. Is this possible through the admin console or I change the code? If so, which files should i be looking at?
I have done some searching around but could not find a solid answer.

I am on 1.3.9h

Thank you in advance.

4 May 2011, 6:14 PM
#2
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

Are you saying you selected a manufacturer in the manufacturer's dropdown list, and that you then wanted sub-categories appearing on that page, because I don't think there's a manufacturers page in the native version of zenCart without some custom coding.

/Soniccc

4 May 2011, 7:01 PM
#3
elena1707 avatar

elena1707

New Zenner

Join Date:
Apr 2011
Posts:
8
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

Yes, sorry, let me clarify this a bit... when you select one of the manufacturers from the drop down inside of the sidebox, it shows you all the products for that manufacturer. I called it "manufacturer page"...Once there, i know there is an alpha sorter filter (which i have disabled) and categories filter. Once one of the categories is selected in this filter (which i believe is a subcategory that contains products from that manufacturer) it filters the list even further. So my question is, is there a way to stick the selected category image above the list of products?

4 May 2011, 7:19 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Image on Manufacturer page

It should be possible with a few lines of PHP in the right file. I'll take a look.

4 May 2011, 7:24 PM
#5
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

I think you will need to custom code it. I'm sure DrByte knows for sure, but custom coding is my guess.

4 May 2011, 7:36 PM
#6
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

And no credit for: > Kim, Ajeh, Afo

4 May 2011, 7:54 PM
#7
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

Are you implying I'm queer?

4 May 2011, 8:04 PM
#8
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,179
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

My comment above had no intentions of mentioning that and was only giving praise to the Whole Zen Team just not "one"..

4 May 2011, 8:07 PM
#9
soniccc avatar

soniccc

Zen Follower

Join Date:
May 2010
Location:
Cyberspace
Posts:
387
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

Well, he uses a mac so he probably belongs to a higher life-form.

4 May 2011, 8:10 PM
#10
elena1707 avatar

elena1707

New Zenner

Join Date:
Apr 2011
Posts:
8
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

gjh42:

It should be possible with a few lines of PHP in the right file. I'll take a look.

I would greatly appreciate it...:clap:

4 May 2011, 8:11 PM
#11
elena1707 avatar

elena1707

New Zenner

Join Date:
Apr 2011
Posts:
8
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

Not sure what this whole queer talk is all about...i guess i am too new for this forum :shocking:

4 May 2011, 8:12 PM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Image on Manufacturer page

The file to edit (or affect) would be /includes/templates/your_template/templates/tpl_index_product_list.php; however, the filter works by javascript without refreshing the page, so PHP is not going to be able to alter the display on the fly. You could probably write a js function to show or change the category image (already in the page code) when the filter changes. You would need somebody who is good with javascript to do that.

4 May 2011, 8:32 PM
#13
elena1707 avatar

elena1707

New Zenner

Join Date:
Apr 2011
Posts:
8
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

Just to make sure i understand this correctly...when the manufacturer is first selected it makes an SQL query to a db and pulls all the records that belong to that manufacturer. Once the list of products is build and all of them are displayed, the category filter "runs" on a client side by selecting only a subset of products and at this point does not go back to the server/db?

4 May 2011, 9:13 PM
#14
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Image on Manufacturer page

I believe so. I haven't examined all of the code there. In any case, it would take a client-side bit of code to alter the category image on filter selection, whether it goes back to the db or not. It might be necessary to pre-fetch all possible category images; I don't know enough js to be sure.

4 May 2011, 9:53 PM
#15
elena1707 avatar

elena1707

New Zenner

Join Date:
Apr 2011
Posts:
8
Plugin Contributions:
0

Re: Categories Image on Manufacturer page

Ewwwe, gross. I was hoping for a quick fix. Oh well, i guess i'll put it on my list of "no-so-quick" things to do...
I was kind of thinking the same thing as fetching all the images for that manufacturer and them calling them out with js. Thanks for your input.:smile: