Jump to content

Problems with text alignment following upgrade


Recommended Posts

I've recently upgraded from prestashop 1.5.4.1 to 1.5.6.0. My theme for my store is from Template Monster. 

One problem I have noticed is that the text for my categories and subcategories description has now moved to below the image instead of to the right (which I want). 

 

http://tomsheehy.com/Prestashop/index.php?id_category=4&controller=category&id_lang=1

 

Here is one of the url's in question. Even trickier is that it is also automatically repeating whatever text I write. And when I click the more button (see url) the text moves into the correct position on the left.

 

Bit confused here. I am new to prestashop and wanted to upgrade so I would be able to use the text editor feature in the back office which allows headings/paragraphs etc. 

 

Any help appreciated

Thanks

Sorcha

Link to comment
Share on other sites

can you show how your category.tpl file looks like? i think that problem is there

you will need to remove something like this: <p class="cat_desc clearfix" id="category_description_short"></p>

 

but to be sure i need an access to file contents

Link to comment
Share on other sites

 

Hi Vekia,

Here it is. Thanks for any help. 

{*

* 2007-2013 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Academic Free License (AFL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:


* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

*  @author PrestaShop SA <[email protected]>

*  @copyright  2007-2013 PrestaShop SA

*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)

*  International Registered Trademark & Property of PrestaShop SA

*}

 

{if isset($category)}

{if $category->id AND $category->active}

{capture assign='page_title'}

{strip}

{$category->name|escape:'htmlall':'UTF-8'}

{if isset($categoryNameComplement)}

{$categoryNameComplement|escape:'htmlall':'UTF-8'}

{/if}

{/strip}

{/capture}

{include file='./page-title.tpl'}

<div data-role="content" id="content">

{if $category->description}

<div class="category_desc clearfix">

{if !empty($category->short_description)}

<p>{$category->short_description}</p>

<p class="hide_desc">{$category->description}</p>

<a href="#" data-theme="a" data-role="button" data-mini="true" data-inline="true" data-icon="arrow-d" class="lnk_more" onclick="$(this).prev().slideDown('slow'); $(this).hide(); return false;" data-ajax="false">{l s='More'}</a>

{else}

<p>{$category->description}</p>

{/if}

</div>

<hr class="margin_less"/>

{/if}

<div class="clearfix">

{include file="./category-product-sort.tpl" container_class="container-sort"}

<p class="nbr_result">{include file="$tpl_dir./category-count.tpl"}</p>

</div>

<hr class="margin_less"/>

 

{include file="./pagination.tpl"}

{include file="./category-product-list.tpl" products=$products}

{include file="./pagination.tpl"}

 

{include file='./sitemap.tpl'}

{elseif $category->id}

<p class="warning">{l s='This category is currently unavailable.'}</p>

{/if}

</div><!-- #content -->

{/if}
Link to comment
Share on other sites

Actually maybe I did post the wrong one. Ok This is definitely it... Sorry

 

{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2013 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
 
{include file="$tpl_dir./breadcrumb.tpl"}
{include file="$tpl_dir./errors.tpl"}
{if isset($category)}
{if $category->id AND $category->active}
<h1>
        <span>
{strip}
{$category->name|escape:'htmlall':'UTF-8'}
{if isset($categoryNameComplement)}
{$categoryNameComplement|escape:'htmlall':'UTF-8'}
{/if}
<strong class="category-product-count">
{include file="$tpl_dir./category-count.tpl"}
</strong>
{/strip}
           </span>
</h1>
        <div class="row_category clearfix">
{if $scenes}
<!-- Scenes -->
{include file="$tpl_dir./scenes.tpl" scenes=$scenes}
 
{else}
<!-- Category image -->
{if $category->id_image}
<div class="align_center category_image ">
<img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage"  />
</div>
{/if}
 
{/if}
        {if $category->description}
{if strlen($category->description) > 480}
<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}
        
            {/if}
                        </div>
{if isset($subcategories)}
<!-- Subcategories -->
<div id="subcategories" class="titled_box ">
<h2>{l s='Subcategories'}</h2>
<ul class="clearfix">
{foreach from=$subcategories item=subcategory name=subcategories}
<li class="categories_box {if $smarty.foreach.subcategories.iteration is div by 5}product_list_5{/if} {if $smarty.foreach.subcategories.iteration is div by 4}product_list_4{/if} {if $smarty.foreach.subcategories.iteration is div by 3}product_list_3{/if} {if $smarty.foreach.subcategories.iteration is div by 4}product_list_4{/if}">
<a class="" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
{if $subcategory.id_image}
<img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')}" alt="" />
{else}
<img src="{$img_cat_dir}default-medium_default.jpg" alt="" />
{/if}
 
</a>
              <a class="lnk_more_sub" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"><i class="icon-caret-right "></i> {$subcategory.name|escape:'htmlall':'UTF-8'|truncate:15:'...'}</a>
</li>
{/foreach}
</ul>
</div>
 
 
{/if}
 
{if $products}
            <div class="sortPagiBar shop_box_row shop_box_row clearfix">
            {include file="./product-sort.tpl"}
            {include file="./nbr-product-page.tpl"}
            </div>
            {include file="./product-list.tpl" products=$products}
            <div class="bottom_pagination shop_box_row  clearfix">
            {include file="./product-compare.tpl"}
            {include file="./pagination.tpl"}
            </div>
        {/if}
{elseif $category->id}
<p class="warning">{l s='This category is currently unavailable.'}</p>
{/if}
{/if}
Link to comment
Share on other sites

if I were you i will instead of:

        {if $category->description}
{if strlen($category->description) > 480}
<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}

use just:

{if $category->description}
<p class="cat_desc">{$category->description}</p>
{/if}
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...