Page 1 of 1

How do I move the category description?

Posted: Tue Feb 12, 2013 3:16 am
by ojejones
For SEO I have added some copy to my category page http://www.vipcases.co.uk/iPhone-5-cases

But I want the copy to appear underneath the products list. Is there a way to do this? Currently the user hits a mass of text instead of seeing a list of my products.

Re: How do I move the category description?

Posted: Tue Feb 12, 2013 3:41 am
by ChetanCx
in your catalog/view/theme/your_theme/template/product/category.tpl
find

Code: Select all

<?php if ($description) { ?>
    <?php echo $description; ?>
    <?php } ?>
cut it and paste it just before

Code: Select all

<?php echo $content_bottom; ?></div>

Re: How do I move the category description?

Posted: Tue Feb 12, 2013 3:50 am
by victorj
CHETANCX beats my by some minutes.

this moves complete category description incl category picture if used

find file:
catalog/view/theme/default/template/product/category.tpl

find
starting line 8 ending line 18 this code:

catalog/view/theme/default/template/product

Code: Select all

  <h1><?php echo $heading_title; ?></h1>
  <?php if ($thumb || $description) { ?>
  <div class="category-info">
    <?php if ($thumb) { ?>
    <div class="image"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" /></div>
    <?php } ?>
    <?php if ($description) { ?>
    <?php echo $description; ?>
    <?php } ?>
  </div>
  <?php } ?>
delete this code.

go to bottom of file

find:

Code: Select all

//--></script> 
insert after

Code: Select all

  <h1><?php echo $heading_title; ?></h1>
  <?php if ($thumb || $description) { ?>
  <div class="category-info">
    <?php if ($thumb) { ?>
    <div class="image"><img src="<?php echo $thumb; ?>" alt="<?php echo $heading_title; ?>" /></div>
    <?php } ?>
    <?php if ($description) { ?>
    <?php echo $description; ?>
    <?php } ?>
  </div>
  <?php } ?>

Re: How do I move the category description?

Posted: Tue Feb 12, 2013 4:13 am
by ojejones
Ok guys that was so quick and helpful. I now just want to get rid of the "Refine Search" bit so it just says the display by grid/list etc underneath.

I would be much obliged if you could help on this?

Re: How do I move the category description?

Posted: Tue Feb 12, 2013 5:16 am
by victorj
around line 19 but in your file some higher find code:

Code: Select all

  <?php if ($categories) { ?>
  <h2><?php echo $text_refine; ?></h2>
  <div class="category-list">
    <?php if (count($categories) <= 5) { ?>
    <ul>
      <?php foreach ($categories as $category) { ?>
      <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
      <?php } ?>
    </ul>
    <?php } else { ?>
    <?php for ($i = 0; $i < count($categories);) { ?>
    <ul>
      <?php $j = $i + ceil(count($categories) / 4); ?>
      <?php for (; $i < $j; $i++) { ?>
      <?php if (isset($categories[$i])) { ?>
      <li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
      <?php } ?>
      <?php } ?>
    </ul>
    <?php } ?>
    <?php } ?>
  </div>
  <?php } ?>
remove or uncomment like this so it is easyer to restore
looks like this:

Code: Select all

<!-- <?php if ($categories) { ?>
  <h2><?php echo $text_refine; ?></h2>
  <div class="category-list">
    <?php if (count($categories) <= 5) { ?>
    <ul>
      <?php foreach ($categories as $category) { ?>
      <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
      <?php } ?>
    </ul>
    <?php } else { ?>
    <?php for ($i = 0; $i < count($categories);) { ?>
    <ul>
      <?php $j = $i + ceil(count($categories) / 4); ?>
      <?php for (; $i < $j; $i++) { ?>
      <?php if (isset($categories[$i])) { ?>
      <li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
      <?php } ?>
      <?php } ?>
    </ul>
    <?php } ?>
    <?php } ?>
  </div>
  <?php } ?> -->

Re: How do I move the category description?

Posted: Tue Feb 12, 2013 5:55 am
by ojejones
Worked a charm. Thanks very much guys. If you need a phone case you know where to come ;-)

Re: How do I move the category description?

Posted: Tue Feb 12, 2013 6:17 am
by victorj
ojejones wrote: If you need a phone case you know where to come ;-)
Not much principles but android rule :laugh:

Re: How do I move the category description?

Posted: Wed Feb 13, 2013 2:20 am
by ojejones
Quick question. After I have moved the info box to the bottom of the page, if I view the page source, I cannot see it in there meaning that the copy (which I wrote primarily for Google) cant be seen by them. Any clues?

Re: How do I move the category description?

Posted: Wed Feb 13, 2013 2:36 am
by ChetanCx
obviously you can see it in source i can see it in this page's source http://www.vipcases.co.uk/iPhone-5-cases .... moving a text block makes no difference