Page 1 of 1

Category page shows unwanted items on top, hw to remove

Posted: Fri Dec 15, 2017 7:25 pm
by dutch13
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!

Re: Category page shows unwanted items on top, hw to remove

Posted: Fri Dec 15, 2017 7:38 pm
by DigitCart
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.

Re: Category page shows unwanted items on top, hw to remove

Posted: Fri Dec 15, 2017 7:52 pm
by dutch13
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