Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I change the Top ? Catalog thingie?


Berkz

Recommended Posts

In my particular example Both the "Top" and "Catalog" point to the same page. What I would want is to just have the "Top" and skip the "Catalog" since it is unnecesary so Instead of this:

 

Top ? Catalog ? Hardware ? Mice ? MSIMPRO

 

I would like to see this :

 

Top ? Hardware ? Mice ? MSIMPRO

 

Best Regards, Berkz

Link to comment
Share on other sites

This will work, plus eliminate the subcategory, per your question:

 

Leave application_top as it is

 

in includes/classes/breadcrumb.php:

Change

      for ($i=0; $i<$trail_size; $i++) {

       if (tep_not_null($this->_trail[$i]['link'])) {

         $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';

       } else {

         $trail_string .= $this->_trail[$i]['title'];

       }



       if (($i+1) < $trail_size) $trail_string .= $separator;

     }

 

To

      function trail($separator = ' - ') {

     $trail_string = '';

     $trail_size = sizeof($this->_trail);



     for ($i=1; $i<$trail_size; $i++) {

 if ($i!=($trail_size-2)){

       if (tep_not_null($this->_trail[$i]['link'])) {

         $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';

       } else {

         $trail_string .= $this->_trail[$i]['title'];

       }

 }

 

       if (($i+1) < $trail_size) $trail_string .= $separator;

     }

Link to comment
Share on other sites

Thanks both of you for the contribute. I have tried both and I came up with a solution that suit my desire. :D

 

Here is the code:

 

Look for function trail($seperator= ' - ')

about line 28

 

Replace this code:

function trail($separator = ' - ') {

$trail_string = '';

$trail_size = sizeof($this->_trail);

 

for ($i=0; $i<$trail_size; $i++) {

if (tep_not_null($this->_trail[$i]['link'])) {

$trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';

} else {

$trail_string .= $this->_trail[$i]['title'];

}

 

if (($i+1) < $trail_size) $trail_string .= $separator;

}

 

return $trail_string;

}

 

 

with this following code:

 

 

function trail($separator = ' - ') {

$trail_string = '';

$trail_size = sizeof($this->_trail);

 

for ($i=2; $i<$trail_size; $i++) {

if (tep_not_null($this->_trail[$i]['link'])) {

$trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';

} else {

$trail_string .= $this->_trail[$i]['title'];

}

 

if (($i+1) < $trail_size) $trail_string .= $separator;

}

 

return $trail_string;

}

 

 

If you notice, all I have changed was only

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

to

for ($i=2; $i<$trail_size; $i++)

 

yes, 0 change to 2

and you will get the result of catagory name and products..etc

no Top, no Catalog

 

 

Enjoy! :D

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Archived

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

×
×
  • Create New...