Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Understanding Category Depth


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?




Link to comment
Share on other sites

In index.php find:



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



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





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


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


<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


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

  • Create New...