Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Understanding Category Depth


pabloron

Recommended Posts

Hello. I'm interested in putting a text intro at the top of a sub-category page. It would be something like:

 

If category="purple" {

write this text;

}

 

I don't know just where to look for all of the cpath stuff so that I can insert my IF statement. Anyone have suggestions about where to begin?

 

Thanks,

Paul

Link to comment
Share on other sites

In index.php find:

 

case 'PRODUCT_LIST_WEIGHT':

$listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

case 'PRODUCT_LIST_PRICE':

$listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

}

}

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

 

The bolded area is where the sub cat name is shown - so this is probably where you want to work.

 

Refer to cats by there number e.g. :

 

if ($current_category_id == '1')
{
? blah blah
}
?else if ($current_category_id == '2')
?{
? ?blah blah blah
? }
? else if etc............

 

The only thing to remember is - these additions won't be dynamic so you will manually need to add cats, into this if statement, that you create in the future.

Your online success is Paramount.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...