Jump to content

[SLOVED]Issue with subcategories


Recommended Posts

Im new in prestashop but i love it, thanks for this wonderful OS solution. It fits all my needs.

So i have this problem here when i click on a category in categories module it brings up a page with the names of the categories and a picture of it(if i uploaded them). I dont know how can i arrange them in something like boxes cuz of different name lenght its all messed up as shown here:

http://bulzine.com/cat...

Its in bulgarian but it doesnt seems to matter, if you can help me with a module or setting solution ill be very grateful. I think that a good idea will be a table structure which locks the width of every single category text link and move the text on second or third row like it is in the categories menu module (every long name cat is on several rows)

Version is 1.2.4.0

Thanks in advance!

Link to comment
Share on other sites

Modify line 38 of category.tpl in your theme's directory from:

<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}



to:

<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}



This will truncate the subcategory name to 35 characters then display '...'. You may need to adjust the truncate value until it displays to your liking.

Link to comment
Share on other sites

Is there any way to send it to a second row or something, ist not a good idea with this "...", or can i remove the name and leave only the picture ? but i want the name visible in the category list

Edit: Oh i see now, i truncated it to 0 and it happend :) , thanks for support wish you very best

Link to comment
Share on other sites

In that case, you should do the following instead. Modify css/global.css in your theme's directory and change:

body#category #subcategories li {
   margin-right:10px;
}       


to:

body#category #subcategories li {
   margin-right:10px;
   width: 80px;
}       

Link to comment
Share on other sites

×
×
  • Create New...