Jump to content

Can't change category page intro min height from 870px


Recommended Posts

I've just upgraded to prestashop 1.6.0.9 and I have noticed a problem with the categories page, I'm not sure if anyone has a solution.
 
The line of code in category.tpl at the start of the category intro and image is as follows:
 
<div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}>

 

I have edited the code to remove the background cover element, and change the image to display in the top right.

 

However, the min-height:{$categorySize.height}px; is setting the height of the div to 870px.

 

My image size for categories is 217px x 217px and no where is 870px set as a height. I have tried deleting the section of code, but it stays there and sets the height as this. I have regenerated thumbnails etc. and been stuck with this for the last 2 hours.

 

Has anyone else come across this error or found a fix for it? I've been searching but can't see anything.

 

Any help would be appreciated.

Link to comment
Share on other sites

  • 2 months later...

I've just upgraded to prestashop 1.6.0.9 and I have noticed a problem with the categories page, I'm not sure if anyone has a solution.

 

The line of code in category.tpl at the start of the category intro and image is as follows:

 

<div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}>

 

I have edited the code to remove the background cover element, and change the image to display in the top right.

 

However, the min-height:{$categorySize.height}px; is setting the height of the div to 870px.

 

My image size for categories is 217px x 217px and no where is 870px set as a height. I have tried deleting the section of code, but it stays there and sets the height as this. I have regenerated thumbnails etc. and been stuck with this for the last 2 hours.

 

Has anyone else come across this error or found a fix for it? I've been searching but can't see anything.

 

Any help would be appreciated.

 

Hi "facethefuture"

I've the same problem.

Did you find a solution?

 

Thanks in advance.

 

Cheers

Edited by ciberebi (see edit history)
Link to comment
Share on other sites

Yes I edited the code as follows to use as an image that is floated to the right of a instead background image,

 

I'm not marking the post as solved as the original problem is a bug in prestashop but this work around seems to work for me.

 

Hope this helps....

<!-- Category image -->
                     <div class="content_scene_cat_bg">
               
                        {if $category->description}
                            <div class="cat_desc">
              
                     {if $category->id_image}
                     <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'medium_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" class="catimageright" />
                     {/if}
                            <span class="category-name">
                                {strip}
                                    {$category->name|escape:'html':'UTF-8'}
                                    {if isset($categoryNameComplement)}
                                        {$categoryNameComplement|escape:'html':'UTF-8'}
                                    {/if}
                                {/strip}
                            </span>
                            {if Tools::strlen($category->description) > 350}
                                <div id="category_description_short" class="rte">{$category->description|truncate:450:'...'} <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more"><strong>{l s='Read More'} »</strong></a></div>
                                <div id="category_description_full" class="unvisible rte">{$category->description}</div>
                                
                            {else}
                                <div class="rte">{$category->description}</div>
                            {/if}
                            </div>
                        {/if}
                     </div>

CSS for catimageright class

.catimageright{float:none; margin:0 auto; display: block;clear:both;}

@media (min-width: 768px) {

.catimageright{float:right; margin:0 0 10px 0;}

}
Edited by facethefuture (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...