Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Create static category page


Guest

Recommended Posts

Posted

If possible, how would I go about changing a dynamic category link to direct to a static page?

Thanks!

Posted
This works

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Thank you for the prompt response, Jim. I already have the code that you referenced in the category.php. I should've been more clear. I need only one of the category links to direct to a static page; the rest need to remain dynamic.

Posted

Here's how the code is right now on categories.php:

 

function tep_show_category($counter) {

//echo $counter;exit;

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

 

$categories_string .= '<a class="categrylnk" href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

//

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

if (tep_has_category_subcategories($counter)) {

// $categories_string .= '->';

}

 

$categories_string .= '</a>';

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

$categories_string .= '<br /><div class="dotline"></div>';

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

}

Posted
Thank you for the prompt response, Jim. I already have the code that you referenced in the category.php. I should've been more clear. I need only one of the category links to direct to a static page; the rest need to remain dynamic.

NO you DON'T already have that code (if you did you wouldn't have started this thread).

 

And that is what the code I posted does - 1 Link static all others dynamic.

:huh:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

My apologies, Jim. I see what you're saying.

 

I found the correct area of code (I think), but it's not working.

 

  tep_show_category($first_element); 

/* ADDED THE NEXT LINE - ALTER TO SUIT YOUR NEEDS */
  $categories_string .= '<a target="_blank" href="http://www.flashingblinkylights.com/gallery.php">New Body Lights</a>';

 $info_box_contents = array();
 $info_box_contents[] = array('text' => $categories_string);
 //echo "<pre>";print_r($info_box_contents);exit;
 new infoBox($info_box_contents);

Posted

Because you have a template.

 

If you had standard osC code it would work.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

I had a feeling that was going to be the response I would get. I'm working on understanding PHP objects, but I'm not quite there yet. We're (i.e. our company) trying not to spend more money outsourcing, if we don't have to. Any advice as to what I can do to understand this so we can take care of this ourselves?

 

I appreciate your time, Jim.

Posted

The only thing I can think of is that the shop must not be using that PHP file. I can't explain it any other way. Unless there is someting in the file that stops the modification from working. I don't see anything that would do that in the codfe you have posted.

 

You'll just have to follow the code and find which file it is using.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Archived

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

×
×
  • Create New...