Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help Indent Sub Categories


Guest

Recommended Posts

Trying to do something like this:

 

Category

(indent) - Sub Category

(indent)(indent) - Sub category

 

I've been snooping around categories.php but havn't had any luck yet.

 

Thanks for the help

 

-Jrock

Link to comment
Share on other sites

Isn't the default osc behavior just like this?

 

The template I'm using indents the first category. Then ALL sub categorys are on the same level.

 

Example of how it is now:

 

PRODUCT

(indent) - subcategory1

(indent) - subcategory1a

 

how it should be.

 

PRODUCT

(indent) - subcategory1

(indent)(indent) - subcatergory1a

 

 

when subcategory1 is clicked, subcategory1a appears, but on the SAME level as sub1. It should be indented instead.

 

I've got a test site going at www.twilightpics.com/osc

 

"roller shades" is the product, and you can see what happens with the sub categories.

 

Thanks man

Link to comment
Share on other sites

Right.. that is okay..

 

but click comfortex, you'll see what I mean

 

the sub category for comfortex doesn't indent again.. it's on the same level as comfortex

 

I have no idea why it's doing this

Link to comment
Share on other sites

yea I see so you should check the categories box. probably in catalog\includes\boxes\categories.php Perhaps the indent stops after the first level. Did you ask the ppl who did the template about it? Because the default osc inserts the spacing on every level.

Link to comment
Share on other sites

trying to get hold of them now.

 

is it possible for you post the original categories.php file on here.. or link me to it?

 

one more thing, i've been making changes to the categories.php file Ii have, and when I test it on the site.. there is no changes. I even deleted the .php file at one point, and the site still functioned fine. Is it possible that it is my categories would be cotrolled someplace else?

 

 

 

Thanks again

 

-Jrock

Link to comment
Share on other sites

I just about busted a nut. I fixed it finally. Here is what was wrong incase anyone else runs into the same problem:

 

in catalog/includes/header.php

 

around line 254 this is what was there:

 

for($i=0;$i<$tree[$counter]['le vel'];$i++)

$categories_string .= '   ';

 

notice the space in ['level']

 

Remove the space so it's like this

 

for($i=0;$i<$tree[$counter]['level'];$i++)

$categories_string .= '   ';

 

solved my problem,

 

I'm going to go clean up the mess I left after trying to solve this one.

Link to comment
Share on other sites

Cool, thanks for passing that on. I've reported the bug to Templatemonsters. com.

 

NOW i'm trying to adjust so what ever level of categories are selected, they're in bold.

 

Like so:

 

product

(space) - product1

 

or

 

product

(space) - product1

(space)(space) - product1a

(space)(space) - product1b

(space) - product2

(space) - product3

 

Any thoughts enigma1?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
any luck with getting the subcats in bold?

 

I'm at the same place now. Thanks!

 

 

 

ripthesystem,

 

I'm still working on that part. I found a contribution that bolds your current location in the categories. However it is set up to work with "categories.php" I need to to work with "header.php" I'll keep you posted. Let me know if you've discoverd something.

 

 

-Jrock

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...