Post by dutch13 » Fri Dec 15, 2017 7:25 pm

The category pages shows unwanted categories on top, how to remove them.
See attachement to visualise the problem. Or click this link to my webshop. https://goo.gl/rv9aco

Thanks guys!

Attachments

categorie-weg.PNG

categorie-weg.PNG (1.01 MiB) Viewed 414 times


New member

Posts

Joined
Wed Feb 18, 2015 4:08 pm

Post by DigitCart » Fri Dec 15, 2017 7:38 pm

Hi,
Those are the thumbs of sub-categories.
In default theme you can remove sub-categories list in category page by editing this file:

Code: Select all

catalog\view\theme\default\template\product\category.tpl
and removing this part:

Code: Select all

      <?php if ($categories) { ?>
      <h3><?php echo $text_refine; ?></h3>
      <?php if (count($categories) <= 5) { ?>
      <div class="row">
        <div class="col-sm-3">
          <ul>
            <?php foreach ($categories as $category) { ?>
            <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
            <?php } ?>
          </ul>
        </div>
      </div>
      <?php } else { ?>
      <div class="row">
        <?php foreach (array_chunk($categories, ceil(count($categories) / 4)) as $categories) { ?>
        <div class="col-sm-3">
          <ul>
            <?php foreach ($categories as $category) { ?>
            <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
            <?php } ?>
          </ul>
        </div>
        <?php } ?>
      </div>
      <?php } ?>
      <?php } ?>
Look for similar code in your custom theme.

My Extensions


User avatar
Active Member

Posts

Joined
Thu Jun 22, 2017 5:32 pm


Post by dutch13 » Fri Dec 15, 2017 7:52 pm

DigitCart wrote:
Fri Dec 15, 2017 7:38 pm
Hi,
Those are the thumbs of sub-categories.
In default theme you can remove sub-categories list in category page by editing this file:

Code: Select all

catalog\view\theme\default\template\product\category.tpl
and removing this part:

Code: Select all

      <?php if ($categories) { ?>
      <h3><?php echo $text_refine; ?></h3>
      <?php if (count($categories) <= 5) { ?>
      <div class="row">
        <div class="col-sm-3">
          <ul>
            <?php foreach ($categories as $category) { ?>
            <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
            <?php } ?>
          </ul>
        </div>
      </div>
      <?php } else { ?>
      <div class="row">
        <?php foreach (array_chunk($categories, ceil(count($categories) / 4)) as $categories) { ?>
        <div class="col-sm-3">
          <ul>
            <?php foreach ($categories as $category) { ?>
            <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
            <?php } ?>
          </ul>
        </div>
        <?php } ?>
      </div>
      <?php } ?>
      <?php } ?>
Look for similar code in your custom theme.
Hmz coding. Not my kind of thing to be honoust. Isn't there a more easy way?

PS: I use Journal 2, it hasn't the same code as above

New member

Posts

Joined
Wed Feb 18, 2015 4:08 pm
Who is online

Users browsing this forum: No registered users and 19 guests