Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Customizing the Category Page

Customizing the Category Page

Locked

Views: 1,130

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
26 Sep 2009, 12:49 AM
#1
dllong avatar

dllong

New Zenner

Join Date:
Jul 2008
Posts:
15
Plugin Contributions:
0

Customizing the Category Page

I am using the latest version of ZenCart and love it. As is usual, I've gotten carried away so could now use some help. I've looked in the FAQs and haven't seen anything that is close. Here's what I'm trying to do. I'd like the main page and the category pages to display image sale ads based upon the current date. For example, a certain sale image is shown for the Thanksgiving holiday and a new image is shown for the Christmas holiday. I've put together the code to allow me to do this on the main page and it works perfectly. I'm using basic PHP switch statements to change the images based upon the current server month.

However, what I'd like to be able to do is do the same thing for certain (not all) category pages. The problem is that the category description is stored in the database and, as I was told before, the PHP code cannot process from there. What I'd like is to know where I would put this PHP code (not sure exactly what page controls the category display) so that it will show the switching images and how do I make sure that it only shows on certain categories (say categories 1,2 and 4 but not 3 since it isn't on sale) and is it the same for the sub categories?

Thanks for any help.

7 Oct 2009, 2:33 PM
#2
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: Customizing the Category Page

Yeh - great question - where can this be customised??

7 Oct 2009, 2:58 PM
#3
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: Customizing the Category Page

the developers tool kit can get you anywhere (eventually).. this is the file that you need to play with:

/public_html/includes/modules/pages/index/main_template_vars.php

..obviously use your template and all the other usual warnings_

7 Oct 2009, 3:06 PM
#4
g_force avatar

g_force

Zen Follower

Join Date:
Feb 2009
Posts:
354
Plugin Contributions:
0

Re: Customizing the Category Page

I should add that you might want to use that in conjunction with:

/public_html/includes/templates/template_default/templates/tpl_index_categories.php

_