Jump to content
Sign in to follow this  
mistafeesh

main categories again!!!!

Recommended Posts

I just can't get this module to work properly! I've posted about it before, and I can see others have too...

 

I just saw that a new version of it was available that makes it work in ms2...but, and this may be due to my installing other contribs and generally messin', I can't find the code it tells me to add to in catalog/default.php

 

it says

Find the following:

 

<tr>

<td class="main"><br><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_MAINPAGE); ?></td>

</tr>

 

And add this AFTER:

 

<tr>

<td><?php include(DIR_WS_MODULES . MAIN_CATEGORIES); ?></td>

</tr>

 

but the code just ain't there! If I put the include in where I think looks like it might work, I get an error. any ideas?


bugrit! millenium hand and shrimp - I told 'em!

Share this post


Link to post
Share on other sites

The define main page is another contribution, which you obviously don't have installed.

 

Find this code:

          <tr>

           <td class="main"><?php echo TEXT_MAIN; ?></td>

         </tr>

 

and add the new code after it so your final code should look like:

          <tr>

           <td class="main"><?php echo TEXT_MAIN; ?></td>

         </tr>

   <tr> 

	 <td><?php include(DIR_WS_MODULES . MAIN_CATEGORIES); ?></td> 

   </tr>

if you want to put a space between the TEXT_MAIN and the MAIN_CATEGORIES, use this code:

          <tr>

           <td class="main"><?php echo TEXT_MAIN; ?></td>

         </tr>

         <tr>

           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

         </tr>

   <tr> 

	 <td><?php include(DIR_WS_MODULES . MAIN_CATEGORIES); ?></td> 

   </tr>

 

Cheers,

Tony


"The price of success is perseverance. The price of failure comes much cheaper."

Share this post


Link to post
Share on other sites

That's where I tried to put it before, as it seemed to make sense. but I get the following error:

Fatal error: Cannot redeclare preorder() (previously declared in /home/dan/public_html/lightoptions/includes/modules/main_categories.php:22) in /home/dan/public_html/lightoptions/includes/boxes/categories.php on line 32

 

I've monkeyed around quite a bit with includes/boxes/categories.php...installing contribs and generally messin'

 

line 32 is somewhere in the following code:

// Keep out parts category

 $excluded_parts_category_id = 28;





// Preorder tree traversal

 function preorder($cid, $level, $foo, $cpath) {

   global $categories_string, $HTTP_GET_VARS;



   if ($cid != 0) {

// 1.7 Get the current path info

	 $category_path = explode('_',$HTTP_GET_VARS['cPath']);

	 $in_path = in_array($cid, $category_path);

	 $this_category = array_pop($category_path);



     for ($i=0; $i<$level; $i++)

	 // 1.7 only indent subcategories (top level are flush left)

   if ($i>0) {

  	 $categories_string .=  '    ';

   }

   // 1.7 indicate the current category

   if ($this_category == $cid) {

  	 $categories_string .=  '> ';

 

 

any ideas??


bugrit! millenium hand and shrimp - I told 'em!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×