Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

I have been using this contribution for a while, but it is only now when we're about to move our site to a new domain that I want to make a few changes. I only use the subtab categories because I have the main categories in the header.

 

Is there a way to list the subcategories in columns instead of listing them continuously in one line (for example, in 3 columns)? This is what my subtab looks like now:

 

subtab1.gif

 

I would like it to resemble what I have done with the subcategories in our Customer Service section.

 

subtab2.gif

 

Thanks for your help in advance.

  • 1 year later...
Posted

i have found a bug with this.

 

if you select a product from any of the info boxes, the tabs at the top do not reflect where you have gone to?

 

can someone please advise on a cure?

 

many thanks

 

YT

there are 10 types of people who understand binary

 

those that do, and those that don't

  • 6 months later...
Posted
i have found a bug with this.

 

if you select a product from any of the info boxes, the tabs at the top do not reflect where you have gone to?

 

can someone please advise on a cure?

 

many thanks

 

YT

 

Well it works fine for me

Posted
i have 3 levels of categories Main,Sub & Sub2, now when a sub is clicked it will show all of the sub2 cats aswell, how can i make it so it does not show any sub2 cats?

 

The solution to this is using the following if statement

if ($fooa[$counter]['level'] == 1) { }

 

Like this

 

Change

	// display category name
$subcategories_string .= $fooa[$counter]['name'];

$subcategories_string .= '</a> ';

if ($fooa[$counter]['next_id']) {
	$subcategories_string .= '| ';
	show_subcategories($fooa[$counter]['next_id']);
}else{
	$subcategories_string .= ' ';
}
}

to

// display category name
if ($fooa[$counter]['level'] == 1) {
$subcategories_string .= $fooa[$counter]['name'];
}



$subcategories_string .= '</a> ';

if ($fooa[$counter]['next_id']) {
	if ($fooa[$counter]['level'] == 1) {
	$subcategories_string .= '| ';
	}
	show_subcategories($fooa[$counter]['next_id']);
}else{
	$subcategories_string .= ' ';
}
}

 

Change the == 1 to what ever you need. == 2 would means only show sub level 2. <=2 would mean show sublevel 1 and 2. Play with it

  • 3 months later...
Posted (edited)

I am using this with STS and have found that when I have more subcategories than will fit in one row across, the whole subcategories area becomes distorted and won't properly display all of the subcategory names. Any idea on what is causing this?

 

Also - for cagegories that do not have a subcategory - is there a way to hide the subcategories row?

 

PS - Once you have clicked into a subcategory, the category tab no longer is a link to that category - how do you make it so they can click that tab and get back to the parent category?

 

The solution to this is using the following if statement

if ($fooa[$counter]['level'] == 1) { }

 

Change the == 1 to what ever you need. == 2 would means only show sub level 2. <=2 would mean show sublevel 1 and 2. Play with it

Edited by TracyS

~Tracy
 

Posted

Figured out one part - the ability to keep the category tab's linked, so if they are in a subcategory and want to get back to the parent category page they can.

 

In includes/categories_tab.php I changed this:

// if tab selected we dont need a link
  if (!$onpage) {
$categories_string .= '<a class="tabsNavigation" href="';
$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new);
$categories_string .= '">';
  }

 

to this:

// if tab selected we dont need a link
//	  if (!$onpage) {
$categories_string .= '<a class="tabsNavigation" href="';
$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new);
$categories_string .= '">';
//	  }

 

Still trying to figure out the hiding when no subcategories are present, and why it gets all weirded out if the subcategories won't fit in just one row across the page.

 

I am using this with STS and have found that when I have more subcategories than will fit in one row across, the whole subcategories area becomes distorted and won't properly display all of the subcategory names. Any idea on what is causing this?

 

Also - for cagegories that do not have a subcategory - is there a way to hide the subcategories row?

 

PS - Once you have clicked into a subcategory, the category tab no longer is a link to that category - how do you make it so they can click that tab and get back to the parent category?

~Tracy
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...