Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Show main categories on home page


Eyals

Recommended Posts

Hello,

 

I'd like to show parent categories in the main index page right below the welcome message, exact way as it shown in cPath=0 format, what code should I extract from index.php and when should I put it?

 

Any help would be appreciated.

 

Thank you.

 

Eyal.

Link to comment
Share on other sites

  • 7 months later...

Don't know if you;ve fixed this as it;s some time ago, but I've just implemented what looks like a working solution.

 

In index.php I simply added

 

$cPath = '0';

 

before line 17

if (isset($cPath) && tep_not_null($cPath)) {

 

So code becomes:

 

// the following cPath references come from application_top.php
 $category_depth = 'top';
$cPath = '0';
if (isset($cPath) && tep_not_null($cPath)) {

 

Seems to work for me OK. It must set cpath for when you are in a category AFTER this line.

 

Laurie

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...