Jump to content

[SOLVED] More text under categories


Recommended Posts

I would like the general description above all categories to be able to have another one below them to add more information.

 

If I add lots of info on top it pushes the categories too far down to be seen.

 

is there a module for this.

 

Using PS1.4

 

Richard

Link to comment
Share on other sites

If you want two descriptions for each category, you may been to add one more field to database and also need to extend the Category class, it might be not easy if you are not familiar on coding PrestaShop.

 

here is one suggestion:

You can use following two fields

 

Meta Description, put it on the top of category

Description, put in on the bottom of the category

 

You can easy to do this by changing the category.tpl file

 

1. Move following code to the bottom of the file

 

{if $category->description}
<div class="cat_desc">{$category->description}</div>
{/if}

 

2. And adding this code to the place where above code located before.

{if $category->meta_description}
<div class="cat_desc">{$category->meta_description}</div>
{/if}

  • Like 2
Link to comment
Share on other sites

If you want two descriptions for each category, you may been to add one more field to database and also need to extend the Category class, it might be not easy if you are not familiar on coding PrestaShop.

 

here is one suggestion:

You can use following two fields

 

Meta Description, put it on the top of category

Description, put in on the bottom of the category

 

You can easy to do this by changing the category.tpl file

 

1. Move following code to the bottom of the file

 

{if $category->description}
<div class="cat_desc">{$category->description}</div>
{/if}

 

2. And adding this code to the place where above code located before.

{if $category->meta_description}
<div class="cat_desc">{$category->meta_description}</div>
{/if}

really cool solution

Link to comment
Share on other sites

  • 3 weeks later...
  • 8 months later...
  • 2 weeks later...

Great solution, thanks! :)

 

Was just wondering though, when using the meta description for a short introductory text, doesnt it hurt your SEO then? I thought google was looking at the meta description to determine content and ranking etc. And then if its only a short text with not many keywords or anything it might cause SEO problems? Does anyone know anything about this? Help would be very much appreciated :)

Link to comment
Share on other sites

  • 10 months later...

(Google tanslate)

I bought a new theme. And there are {if $ category-> description} bar away.
On the same lines is now

 

{if $category->description}
   {if strlen($category->description) > 3000}
    <p class="cat_desc clearfix" id="category_description_short">{$category->description|truncate:480} <span onclick="$('#category_description_short').hide(); $('#category_description_full').show();" class="lnk_more_cat"><i class="icon-plus-sign"></i> {l s='More'}</span></p>
   <p class="cat_desc clearfix" id="category_description_full" style="display:none">{$category->description}<span onclick="$('#category_description_short').show(); $('#category_description_full').hide();" class="lnk_more_cat close_cat"><i class="icon-minus-sign"></i> {l s='Hide'}</span></p>
   {else}
   <p class="cat_desc clearfix">{$category->description}</p>
   {/if}

Link to comment
Share on other sites

 

(Google tanslate)

I bought a new theme. And there are {if $ category-> description} bar away.
On the same lines is now

 

{if $category->description}
   {if strlen($category->description) > 3000}
    <p class="cat_desc clearfix" id="category_description_short">{$category->description|truncate:480} <span onclick="$('#category_description_short').hide(); $('#category_description_full').show();" class="lnk_more_cat"><i class="icon-plus-sign"></i> {l s='More'}</span></p>
   <p class="cat_desc clearfix" id="category_description_full" style="display:none">{$category->description}<span onclick="$('#category_description_short').show(); $('#category_description_full').hide();" class="lnk_more_cat close_cat"><i class="icon-minus-sign"></i> {l s='Hide'}</span></p>
   {else}
   <p class="cat_desc clearfix">{$category->description}</p>
   {/if}

 

 

hello and at the moment what you exactly expect?


I got it to succeed in a different way to get it to work

sorry my mistake i've noticed that you posted another answer here.

where the problem was?

Link to comment
Share on other sites

×
×
  • Create New...