Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest Romulus Design

"Blocking" a category from displaying in categories.tpl

Recommended Posts

Guest Romulus Design

The site I'm building with ZenCart is run this way. In the navigation, there are categories, and then accessories. Obviously, accessories is a category itself, but I do not want it to be listed with the categories drop-down menu I built.

What I plan to do is implement an if-statement in categories.tpl

If catId=6, don't print anything. Otherwise, do what it normally does.

<?

...Existing Loop

if(catID != 6)

print(...) //Existing statement.

However, the code is kind of cryptic. What files would I need to edit for this? I don't think it would be the .tpl file itself, but the file that controls the categories.tpl file. I just have no idea which one that is!

Thanks for any and all help. It doesn't seem too hard, I just don't know where the control file is.

Share this post


Link to post
Share on other sites

Guest Romulus Design

Is it rude for me to bump my post? It's been like a week, and I got no answers...

I told my client the second best idea I have is to write a PHP script that does that categories.tpl does, except I can't tell which categories are still active. Like for example, their "core" category has CAT.ID of 5. They erased categories 1-4.

Also, another idea I just had, how will it get the CAT.NAME?

I really wish someone could just tell me how to implement PHP into these .tpl files.

Share this post


Link to post
Share on other sites
Guest

you may want to post your questions at cubecartforums.org

Share this post


Link to post
Share on other sites
Guest Wrk_InProgress

I am not 100% familiar with the templating system even though I have hacked it to bits.

It might make the most sense to just go find the included php file associated with the categories box and eliminate the catID from the SQL statement.

As it stands, Iwould think the SELECT statement pulls all the catIDs, so you have to add a WHERE clause.

Share this post


Link to post
Share on other sites

What files would I need to edit for this? I don't think it would be the .tpl file itself, but the file that controls the categories.tpl file. I just have no idea which one that is!

Thanks for any and all help. It doesn't seem too hard, I just don't know where the control file is.

The control file information for all templates can be found over in the CubeCartForums.org Documentation. Hope this helps.

Share this post


Link to post
Share on other sites

×
×
  • Create New...