Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add Home link to category listing

Add Home link to category listing

Locked

Views: 2,666

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
10 Jan 2007, 3:34 PM
#1
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Add Home link to category listing

I want to add Home to where the product categories are displayed.

Such as Home | Product Category | Product Category

I have been searching for this but I can not find it.

10 Jan 2007, 4:36 PM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Add Home link to category listing

admin -> configuration -> layout settings -> Categories-Tabs Menu ON/OFF

This will give you a "new navigation bar" which will list your categories.

11 Jan 2007, 2:42 AM
#3
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Re: Add Home link to category listing

Actually that is already on.

I just want to have the Home`link next to the categories.

11 Jan 2007, 3:23 AM
#4
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Add Home link to category listing

OK, try this:

in includes/templates/template_default/templates/tpl_modules_categories_tabs.php

find this code:

<div id="navCatTabsWrapper">
<div id="navCatTabs">
<ul>

Just below the <ul> add the following line of code:

<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>

Save the file to includes/templates/YOUR_TEMPLATE/templates/tpl_modules_categories_tabs.php and upload it to your server.

11 Jan 2007, 3:31 AM
#5
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Re: Add Home link to category listing

Excellent thank you very much.

Would you also know where to change the CSS so I can change the styling of this area?

11 Jan 2007, 3:54 AM
#6
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Add Home link to category listing

find the following declarations in your stylesheet

#navCatTabsWrapper
#navCatTabs

apply the styling you want.

11 Jan 2007, 4:22 AM
#7
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Re: Add Home link to category listing

Yeah I was using that before, but the categories are still grey. I also tried changing all the entries that use that to the same color, which was not grey.

Thanks again.

16 Jan 2007, 9:07 PM
#8
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Re: Add Home link to category listing

Slightly new variant of the same thing:

You know in the category sidebar?

Categories

Product Category
Product Category
Product Category
Product Category
etc

I actually would like to have:

Categories

Home
Product Category
Product Category
Product Category

Is that possible?

16 Jan 2007, 9:28 PM
#9
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Add Home link to category listing

Yes, it can be done as follows:

in includes/templates/template_default/sideboxes
Open tpl_categories.php and find the following line of code:

for ($i=0;$i<sizeof($box_categories_array);$i++) {

JUST ABOVE this line add the following:

$content .= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'  . HEADER_TITLE_CATALOG . '</a>';

Save the edited file to includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories.php and upload to your server.

16 Jan 2007, 11:52 PM
#10
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Re: Add Home link to category listing

I actually have that CSS Menu thing installed, so this has not worked, yet.

17 Jan 2007, 12:00 AM
#11
outlawlb avatar

outlawlb

New Zenner

Join Date:
Jan 2007
Posts:
86
Plugin Contributions:
0

Re: Add Home link to category listing

I actually have that CSS Menu thing installed, so this after adding that I added

$content .= '<ul class="level1"><li><a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . HEADER_TITLE_CATALOG . '</a></li></ul>';

above

$content .= $menulist; // see the modules/sideboxes/YOURTEMPLATE/categories_css.php for this

in modules/sideboxes/YOURTEMPLATE/categories_css.php for this

22 Feb 2007, 5:41 PM
#12
rsprinkel avatar

rsprinkel

New Zenner

Join Date:
Feb 2007
Posts:
73
Plugin Contributions:
0

Re: Add Home link to category listing

clydejones:

Yes, it can be done as follows:

in includes/templates/template_default/sideboxes
Open tpl_categories.php and find the following line of code:

for ($i=0;$i<sizeof($box_categories_array);$i++) {

>  
> JUST ABOVE this line add the following:
>  
> ```php
$content .= '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'  . HEADER_TITLE_CATALOG . '</a>';

Save the edited file to includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories.php and upload to your server.

I would like to be able to do the same, but for some unknown reason the section you mentioned to search for ```
for ($i=0;$i<sizeofCOLOR=#007700;[/COLOR]$i++) {

 
Any help, LOL.
 
Thanks much in advance.
 
RSprinkel
22 Feb 2007, 9:06 PM
#13
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Add Home link to category listing

This is the beginning of the file in question.

<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $
 */
  $content = "";
  
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
  for ($i=0;$i<sizeof($box_categories_array);$i++) {
    switch(true) {

The highlighted portion is the line of code you need to find.

If your category sidebox is functioning correctly that line of code should be there. If not I'd suggest you upload a clean copy of this file.

22 Feb 2007, 9:18 PM
#14
rsprinkel avatar

rsprinkel

New Zenner

Join Date:
Feb 2007
Posts:
73
Plugin Contributions:
0

Re: Add Home link to category listing

Hi clydejones,

Thanks for the info. Line was found.

Sheesh I can not count on EditPlus2 to do searchs for me anymore :no: .

I use Edit Plus2 for everything involving code and this is the FIRST Time it has ever not found code for me. :yes:

Sorry for the post. Guess I will manually have to start searching for things, LOL. :wacko:

22 Feb 2007, 9:19 PM
#15
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Add Home link to category listing

glad to help

7 Dec 2007, 11:44 PM
#16
derbra1513 avatar

derbra1513

New Zenner

Join Date:
May 2006
Posts:
29
Plugin Contributions:
0

Re: Add Home link to category listing

I am having a similar problem and I think I am very closeto accomplishing a solution. We made a site for a client which is located here http://www.runwayclothesconsignment.com/
and then added the shopping cart after completing all the links what I need is for the page at http://www.runwayclothesconsignment.com/ to look like
http://www.runwayclothesconsignment.com/store/index.php?main_page=index&cPath=17
so I have the pages made and just need to add

about us
info for shoppers
info for customers
contact us

links to the catagories box inside the shopping cart. hope that all makes since thanks, Derrick