Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can you make sub categories appear on middle of page all time


Mark-UK

Recommended Posts

Posted

When someone clicks on a top level category on the left menu can I make my subcategoies appear on the main part of the middle of the page, and also so the sub categories stay there even if the user clicks on a sub category, so they can quickly click through to different sub categories from wherever they are.

 

Is this possible.

 

thanks

Posted
Is this possible thanks.

 

of course it's possible ... you have the cPath link in the url, just read the second last link

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

I want the same. Like I want the category infobox to show only the main categoris. And when a main category is clicked, its subcategories should appear in a dropdown box in the main page. Is that possible?

Posted
I want the same. Like I want the category infobox to show only the main categoris. And when a main category is clicked, its subcategories should appear in a dropdown box in the main page. Is that possible?

 

sure it is! tweak the categories.php and have fun!

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
sure it is! tweak the categories.php and have fun!

Hi Monika,

 

I have got partial success. Now I have got a drop down menu in the center page (not in the infobox..I dont want it in infobox either). I placed this code in the index.php page:

 

	<tr><td><?php
function tep_get_paths($categories_array = '', $parent_id = '0', $indent = '', $path='') {
global $languages_id;

if (!is_array($categories_array)) $categories_array = array();

$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
  if ($parent_id=='0'){
$categories_array[] = array('id' => $categories['categories_id'],
								  'text' => $indent . $categories['categories_name']);
  }
  else{
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
								  'text' => $indent . $categories['categories_name']);
  }

  if ($categories['categories_id'] != $parent_id) {
$this_path=$path;
if ($parent_id != '0')
  $this_path = $path . $parent_id . '_';
	$categories_array = tep_get_paths($categories_array, $categories['categories_id'], $indent . '??', $this_path);
  }
}

return $categories_array;
 }

 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => 'The Below Sub-Category is Selected'
			 );
 new contentBoxHeading($info_box_contents, true, false);
?><br><?php
 $info_box_contents = array();
 $info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT) . '" method="get">' . tep_hide_session_id(),
						   'align' => 'left',
						   'text'  => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath, 'onchange="this.form.submit();"')
						  );

 new contentBox($info_box_contents);
 ?></tr></td>

 

Now the categories look like this:

 

 

 

Webpage with Sub-Category dropdown list in the Middle

 

 

But it is not exactly what I want. I dont want this drop down list to show me all the top and all the sub-categories. I want it to show only the sub-categories of that category, which I have selected using the category infobox.

 

I guess what I am trying to acheive has sumthing to do with this block of code:

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

 

And perhaps the following threads would help:

 

Thread 1

 

Thread 2

 

But both these threads are not about how to do the task in a drop down menu. I hope someone can have a look at my coding as well as these threads and help me out. Thanks in advance & sorry for the long thread :rolleyes:

Posted

if ($parent_id=='0'){
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}
else{
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

 

see this part? rewrite it to only do something when parent_id is not 0 ... see a bit below in your code ...

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

Thanks, monika.I have commented the line:

//$categories_array[] = array('id' => $categories['categories_id'],

// 'text' => $indent . $categories['categories_name']);

 

And this removes the main/top categories. But still all the sub-categories are being displayed. I need that when I select/click a top-level category, sub-categories assosicated with that top-level category only get displayed.

Posted
if ($parent_id=='0'){
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}
else{
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

 

see this part? rewrite it to only do something when parent_id is not 0 ... see a bit below in your code ...

Where and how should I re-write this part? Are you talking about this block of code:

 

if ($categories['categories_id'] != $parent_id) {
$this_path=$path;
if ($parent_id != '0')
  $this_path = $path . $parent_id . '_';
	$categories_array = tep_get_paths($categories_array, $categories['categories_id'], $indent . '  ', $this_path);
  }
}

 

If yes, please guide me as to how should I use the code you told in this block. Thanks,

Posted
Where and how should I re-write this part? Are you talking about this block of code:

 

if ($categories['categories_id'] != $parent_id) {
$this_path=$path;
if ($parent_id != '0')
  $this_path = $path . $parent_id . '_';
	$categories_array = tep_get_paths($categories_array, $categories['categories_id'], $indent . '  ', $this_path);
  }
}

 

If yes, please guide me as to how should I use the code you told in this block. Thanks,

 

ah, you haven't changed the select statement yet to only show the category from the cPath like I suggested in my first post to this thread? That should get rid of the unnecessary subcats.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
ah, you haven't changed the select statement yet to only show the category from the cPath like I suggested in my first post to this thread? That should get rid of the unnecessary subcats.

 

Thanks for replying. What code should I place inside this code? :

 

if ($parent_id=='0'){
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}
else{
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

Posted
Thanks for replying. What code should I place inside this code? :

 

if ($parent_id=='0'){
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}
else{
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

 

find this:

  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

change to this

  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

 

find this

if ($parent_id=='0'){
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}
else{
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

 

change to this

if ($parent_id!='0'){
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

Thanks again but I could not find this code :

 

 

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

Posted
Thanks again but I could not find this code :

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

 

line 73 in my categories.php

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
line 73 in my categories.php

 

Actually I haven't used the orignal coding of categories.php in my index.php file. I have make use of a contribution and it uses the below code (instead of the orignal categories.php code). The block you are refering to your last post is not found in my code.

 

<tr><td><?php
function tep_get_paths($categories_array = '', $parent_id = '0', $indent = '', $path='') {
global $languages_id;

if (!is_array($categories_array)) $categories_array = array();

$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {
if ($parent_id=='0'){
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}
else{
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

if ($categories['categories_id'] != $parent_id) {
$this_path=$path;
if ($parent_id != '0')
$this_path = $path . $parent_id . '_';
$categories_array = tep_get_paths($categories_array, $categories['categories_id'], $indent . '  ', $this_path);
}
}

return $categories_array;
}

$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => 'The Below Sub-Category is Selected'
);
new contentBoxHeading($info_box_contents, true, false);
?><br><?php
$info_box_contents = array();
$info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT) . '" method="get">' . tep_hide_session_id(),
'align' => 'left',
'text' => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath, 'onchange="this.form.submit();"')
);

new contentBox($info_box_contents);
?></tr></td>

 

But I'm trying to get it done by comparing it with a few similar select statments. I'll post whatever happens to my tries then.

Posted

Ok. Now some improvement has been made. The top-level categories are all gone. But I can still see the sub-categories of other top-level categories along with the sub-categories of the selected top-level category. I mean that the dropdown list is displaying all the sub-categories of all the top-level categories. Only the top-level categories are now not displaying in the drow down menu.

 

As I had told you my coding is a bit different and it doesn't have that select statement. I have had two select statements. First I replaced only the first one , then only the second one and then both with the code you have told. All the three produce the same result, i.e. showing all the sub-categories including the ones which are not from the selected top-level category.

 

 

One select statement was:

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

 

And the second one is:

 

 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

 

 

 

Below is the coding of that part of index.php which has something to do with the categories and the dropdown menu. Both the above block can be found into it. After this code the coding of new products module starts.

<?php
/*
 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 Alchemy Stores Online
 http://www.AlchemyStores.com

 Copyright (c) 2005 Alchemy Stores

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// the following cPath references come from application_top.php
 $category_depth = 'top';
 if (isset($cPath) && tep_not_null($cPath)) {
$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
  $category_depth = 'products'; // display products
} else {
  $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
  $category_parent = tep_db_fetch_array($category_parent_query);
  if ($category_parent['total'] > 0) {
	$category_depth = 'nested'; // navigate through the categories
  } else {
	$category_depth = 'products'; // category has no products, but display the 'no products' message
  }
}
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<?php
 if ($category_depth == 'nested') {
$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);
?>
<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>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
<?php
if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
  $category_links = array_reverse($cPath_array);
  for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
  //this is the first one
	$categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
	$categories = tep_db_fetch_array($categories_query);
	if ($categories['total'] < 1) {
	  // do nothing, go through the loop
	} else {
//this is the second one
	 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");


	  break; // we've found the deepest category the customer is in
	}
  }
} else {
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");

}
///START:  CODE FROM THE DROPDOWN CATS MODULE
?>

<tr><td><?php
function tep_get_paths($categories_array = '', $parent_id = '0', $indent = '', $path='') {
global $languages_id;

if (!is_array($categories_array)) $categories_array = array();

$categories_query = tep_db_query("select c.categories_id, cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where parent_id = '" . (int)$parent_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
while ($categories = tep_db_fetch_array($categories_query)) {if ($parent_id!='0'){
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

  if ($categories['categories_id'] != $parent_id) {
$this_path=$path;
if ($parent_id != '0')
  $this_path = $path . $parent_id . '_';
	$categories_array = tep_get_paths($categories_array, $categories['categories_id'], $indent . '  ', $this_path);
  }
}

return $categories_array;
 }

 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left',
						   'text'  => 'The Below Sub-Category is Selected'
			 );
 new contentBoxHeading($info_box_contents, true, false);
?><br><?php
 $info_box_contents = array();
 $info_box_contents[] = array('form' => '<form action="' . tep_href_link(FILENAME_DEFAULT) . '" method="get">' . tep_hide_session_id(),
						   'align' => 'left',
						   'text'  => tep_draw_pull_down_menu('cPath', tep_get_paths(array(array('id' => '', 'text' => PULL_DOWN_DEFAULT))), $cPath, 'onchange="this.form.submit();"')
						  );

 new contentBox($info_box_contents);
 ?></tr></td>

Posted
Ok. Now some improvement has been made. The top-level categories are all gone. But I can still see the sub-categories of other top-level categories along with the sub-categories of the selected top-level category. I mean that the dropdown list is displaying all the sub-categories of all the top-level categories. Only the top-level categories are now not displaying in the drow down menu.

 

As I had told you my coding is a bit different and it doesn't have that select statement. I have had two select statements. First I replaced only the first one , then only the second one and then both with the code you have told. All the three produce the same result, i.e. showing all the sub-categories including the ones which are not from the selected top-level category.

One select statement was:

 

Well this was wrong. Actually the top-level categories got removed due to the replaced of this:

 

 

CODE
if ($parent_id=='0'){
$categories_array[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}
else{
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

 

to this

if ($parent_id!='0'){
$categories_array[] = array('id' => $path . $parent_id . '_' .$categories['categories_id'],
'text' => $indent . $categories['categories_name']);
}

 

The replacement of the one or the other or both the selected statements don't make any difference. Monika, I hope you will be able to find out time to help me solve this issue. I am sure we are close to it completing it now :)

Posted

change

 

<tr><td><?php
function tep_get_paths($categories_array = '', $parent_id = '0', $indent = '', $path='') {
global $languages_id;

 

to

<tr><td><?php

function tep_get_paths($categories_array = '', $parent_id = $current_category_id, $indent = '', $path='') {

global $languages_id;

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

Thanks but I am getting this error:

 

Parse error: parse error, unexpected T_VARIABLE in c:\web\sepdemo\alchemystores\two\index.php on line 104

 

Line 104 is:

 

function tep_get_paths($categories_array = '', $parent_id = $current_category_id, $indent = '', $path='')

 

Most probably the error is in the writing of this:

 

 

$parent_id = $current_category_id

Posted
Thanks but I am getting this error:

 

Parse error: parse error, unexpected T_VARIABLE in c:\web\sepdemo\alchemystores\two\index.php on line 104

 

Line 104 is:

 

function tep_get_paths($categories_array = '', $parent_id = $current_category_id, $indent = '', $path='')

 

Most probably the error is in the writing of this:

$parent_id = $current_category_id

 

 

change it back please ... can I then see a link?

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted
change it back please ... can I then see a link?

 

I'm only experimenting here, but try this:

 

find this

if ($categories['categories_id'] != $parent_id) {
$this_path=$path;
if ($parent_id != '0')
$this_path = $path . $parent_id . '_';
$categories_array = tep_get_paths($categories_array, $categories['categories_id'], $indent . '  ', $this_path);
}
}

return $categories_array;

 

change to this

if ($categories['categories_id'] != $parent_id) {
$this_path=$path;
if ($parent_id != '0')
$this_path = $path . $parent_id . '_';
$categories_array = tep_get_paths($categories_array, $cPath, $indent . '', $this_path);
}
}

return $categories_array;

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

Well that doesn't work. I get this error:

 

The page cannot be displayed

 

I am sure we are close to solving it. Perhaps we are missing something very easy...

Posted
Well that doesn't work. I get this error:

 

The page cannot be displayed

 

I am sure we are close to solving it. Perhaps we are missing something very easy...

 

can you confirm the last long code you posted is the one you have up right now?

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

I am using the same last code right now.

 

But I checked the last piece of code posted by you on my local machine. Do you want me to update the website with that code?

Archived

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

×
×
  • Create New...