Jump to content

Category display


stevemil

Recommended Posts

If I add a description to the category it displays the category name partially across the picture. If I have no description it does not display the category name. How can I add the description without it adding the category name?

customsbysteveandterry.com

 

As always thanks for the help.

 

Steve

Link to comment
Share on other sites

This is default themes? 

Check file category.tpl inside your theme. You have line like:

<h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}"><span class="cat-name">{$category->name|escape:'html':'UTF-8'}{if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'}{/if}</span>{include file="$tpl_dir./category-count.tpl"}</h1>

This line must be not inside {if}{/if}

Edited by presta4you.com (see edit history)
Link to comment
Share on other sites

Thanks for the response, but I do not see the same line in the file. Sorry not up to understanding all the code. I know it is there but I don't see it. Here is the file, what do I need to change?

 

Thanks again.

*
* 2007-2015 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:
* http://opensource.org/licenses/afl-3.0.php
* 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-2015 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 count($categoryProducts) > 0 && $categoryProducts !== false}
<section class="page-product-box blockproductscategory">
    <h3 class="productscategory_h3 page-product-heading">{$categoryProducts|@count} {l s='other products in the same category:' mod='productscategory'}</h3>
    <div id="productscategory_list" class="clearfix">
        <ul id="bxslider1" class="bxslider clearfix">
        {foreach from=$categoryProducts item='categoryProduct' name=categoryProduct}
            <li class="product-box item">
                <a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)}" class="lnk_img product-image" title="{$categoryProduct.name|htmlspecialchars}"><img src="{$link->getImageLink($categoryProduct.link_rewrite, $categoryProduct.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{$categoryProduct.name|htmlspecialchars}" /></a>
                <h5 itemprop="name" class="product-name">
                    <a href="{$link->getProductLink($categoryProduct.id_product, $categoryProduct.link_rewrite, $categoryProduct.category, $categoryProduct.ean13)|escape:'html':'UTF-8'}" title="{$categoryProduct.name|htmlspecialchars}">{$categoryProduct.name|truncate:14:'...'|escape:'html':'UTF-8'}</a>
                </h5>
                {if $ProdDisplayPrice && $categoryProduct.show_price == 1 && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
                    <p class="price_display">
                    {if isset($categoryProduct.specific_prices) && $categoryProduct.specific_prices
                    && ($categoryProduct.displayed_price|number_format:2 !== $categoryProduct.price_without_reduction|number_format:2)}

                        <span class="price special-price">{convertPrice price=$categoryProduct.displayed_price}</span>
                        {if $categoryProduct.specific_prices.reduction && $categoryProduct.specific_prices.reduction_type == 'percentage'}
                            <span class="price-percent-reduction small">-{$categoryProduct.specific_prices.reduction * 100}%</span>
                        {/if}
                        <span class="old-price">{displayWtPrice p=$categoryProduct.price_without_reduction}</span>

                    {else}
                        <span class="price">{convertPrice price=$categoryProduct.displayed_price}</span>
                    {/if}
                    </p>
                {else}
                <br />
                {/if}
                <div class="clearfix" style="margin-top:5px">
                    {if !$PS_CATALOG_MODE && ($categoryProduct.allow_oosp || $categoryProduct.quantity > 0)}
                        <div class="no-print">
                            <a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$categoryProduct.id_product|intval}&token={$static_token}&add")|escape:'html':'UTF-8'}" data-id-product="{$categoryProduct.id_product|intval}" title="{l s='Add to cart' mod='productscategory'}">
                                <span>{l s='Add to cart'}</span>
                            </a>
                        </div>
                    {/if}
                </div>
            </li>
        {/foreach}
        </ul>
    </div>
</section>
{/if}

Link to comment
Share on other sites

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...