Remove the Breadcrumb on selected top category pages

ThemeBurn SupportForumsOpenCart ThemesShoppica OpenCart ThemeRemove the Breadcrumb on selected top category pages

This topic has been marked as resolved.

Hello and thank you for the great theme and amazing support!!

As stated in the title, I’m trying to prevent the Breadcrumb from displaying on some of the top category pages. I tried to apply a similar code to the one you provided me in a previous post (http://support.themeburn.com/topic/shoppica-footer) but haven’t been able to make it work. This is what I’ve done:

In shoppica/template/product/category.tpl I wrapped the breadcrumb code with:

<?php if (!isset($this->request->get['route']) || (isset($this->request->get['route']) && ($this->request->get['route'] !== 'product/category&path=59' || $this->request->get['route'] !== 'product/category&path=64'))) { ?>
<?php } ?>

So it looks like this:
  <!-- ---------------------- -->
  <!--     I N T R O          -->
  <!-- ---------------------- -->
  <div id="intro">
  <?php if ($this->document->shoppica_intro_banner): echo $this->document->shoppica_intro_banner; else: ?>

    <?php if (!isset($this->request->get['route']) || (isset($this->request->get['route']) && ($this->request->get['route'] !== 'product/category&path=59' || $this->request->get['route'] !== 'product/category&path=64'))) { ?>
    <div id="intro_wrap">
      <div class="container_12">
        <div id="breadcrumbs" class="grid_12">
          <?php foreach ($breadcrumbs as $breadcrumb): ?>
          <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
          <?php endforeach; ?>
        </div>
        <h1><?php echo $heading_title; ?></h1>
      </div>
    </div>
  <?php } ?>
  <?php endif; ?>
  </div>
  <!-- end of intro -->

product/category&path=59 and product/category&path=64 being the 2 categories where I do not wish to display the Breadcrumb.

I’m guessing maybe the ‘&path=59′ is what prevents it from working?

I hope I’m making myself clear, any help will be greatly appreaciated!

Btw, I have Shoppica v1.0.11 and OpenCart v1.5.1.3.

mrbrett

March 12, 2012 at 3:43 am #7012

You may try the following statement to check for the desired categories:

<?php if ($this->request->get['path'] != '59' && $this->request->get['path'] != '64') { ?>

Let us know if this works.

Regards,
ThemeBurn team

March 15, 2012 at 10:22 am #7135

It works like a charm!!! Thank you very much!

Just wondering, why the ‘isset’ part was not needed in this case?
Let me know if you have time, but it’s not important… just curious.

Thanks!

  • This reply was modified 4428 days ago by  mrbrett.
March 16, 2012 at 1:45 am #7170

Because the request variable ‘path’ is always set on this template, assuming that you enter the correct url. You may add it for any case:

<?php if (isset($this->request->get['path']) &&  $this->request->get['path'] != '59' && $this->request->get['path'] != '64') { ?>

March 16, 2012 at 11:07 am #7177
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.