If this is your first visit, check our documentation. To post, register or login.
Forums / Setting Up Categories, Products, Attributes / Category section Image help plz.

Category section Image help plz.

Started by amebb on 5 Feb 2022, 9:36 AM · Views: 1,242

Results 1 to 6 of 6
5 Feb 2022, 9:36 AM
#1
amebb avatar

amebb

Zen Follower

Join Date:
May 2008
Location:
UK
Posts:
408
Plugin Contributions:
0

Category section Image help plz.

I need some help here please.

What i am trying to do is change the size of the image i want in the Catagory page.

So, if i had 5 categories when you click on Cat 1, the page loads and it has a small picture on the top with a cat description.
I would like to change the size of that picture please.

I know that if you goto Configuation > Images you can do it from there, but i dont know where i need to click on to change the cat pic size.

Any help is much appreciated.

Thank you

5 Feb 2022, 12:07 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Category section Image help plz.

If you look at includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_list.php

it will have something like this to display the category images.

<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT); ?></div>

Those two settings are under Admin > Configuration > Images like you said. Their names are:

Category Icon Image Width - Product Info Pages
Category Icon Image Height - Product Info Pages

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

5 Feb 2022, 12:28 PM
#3
amebb avatar

amebb

Zen Follower

Join Date:
May 2008
Location:
UK
Posts:
408
Plugin Contributions:
0

Re: Category section Image help plz.

swguy:

If you look at includes/templates/YOUR_TEMPLATE/templates/tpl_index_product_list.php

it will have something like this to display the category images.

<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT); ?></div>

Those two settings are under Admin > Configuration > Images like you said. Their names are:

Category Icon Image Width - Product Info Pages
Category Icon Image Height - Product Info Pages

Oh FANTASTIC thank you for your help.

6 Feb 2022, 2:07 PM
#4
amebb avatar

amebb

Zen Follower

Join Date:
May 2008
Location:
UK
Posts:
408
Plugin Contributions:
0

Re: Category section Image help plz.

Hi, the information you gave me was slightly wrong.

When you goto configuration > Images then you click on -

Top Subcategory Image Height
Top Subcategory Image Width

This then changes the picture for that catagory.

This changed the size of the image that i can have in the category section.
Thank you for helping anyways - much appreciated.

Now.... how can i centralise the image? At the moment it sits to the left of the placement.

Thanks

6 Feb 2022, 4:00 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Re: Category section Image help plz.

Yes it's different for a page with categories vs a page with products. You didn't specify which you had so I assumed the latter.

How to fix your next issue using Google Chrome:
Hover over the image
Right click -> Inspect
It will show you the HTML for displaying the image which will likely include a class or an ID.
Modify your CSS to style that class or ID in the desired way.
Clear cache; reload the page.
Repeat as necessary until it looks like you want.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

7 Feb 2022, 12:32 PM
#6
amebb avatar

amebb

Zen Follower

Join Date:
May 2008
Location:
UK
Posts:
408
Plugin Contributions:
0

Re: Category section Image help plz.

swguy:

Yes it's different for a page with categories vs a page with products. You didn't specify which you had so I assumed the latter.

How to fix your next issue using Google Chrome:
Hover over the image
Right click -> Inspect
It will show you the HTML for displaying the image which will likely include a class or an ID.
Modify your CSS to style that class or ID in the desired way.
Clear cache; reload the page.
Repeat as necessary until it looks like you want.

Thank you - i will try doing that today. Sounds complicated (the CSS file part) but i will try.

Will let you know the progress lol

Thanks