Jump to content

Problème d'affichage


Recommended Posts

Boonjour,

Je viens de me rendre compte d'un problème d’affichage sur mon site. 

Sur les catégories parentes il affiche tous les produits les uns sur les autres sur une colonne,  alors que sur les sous-catégories aucun problème.

Voici le code de mon fichier category.tpl

Je suis sous presta 1.7.5

Vous comprenez le souci?

Petite précision, dans le logiciel Brackets il me met en rouge cette ligne 


<div class="jhp-sub-category-wrapper col-xs-6 col-sm-3 col-md-2 col-lg-2 col-xl-1">

ainsi que le dernier </div>

 

Merci beaucoup

{**
 * 2007-2019 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (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:
 * https://opensource.org/licenses/AFL-3.0
 * 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 <contact@prestashop.com>
 * @copyright 2007-2019 PrestaShop SA
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *}
{strip}
{extends file='catalog/listing/product-list.tpl'}

{block name='product_list_header'}
		<div class="block-category card card-block clearfix jhp-category-block-wrapper">
			<div class="jhp-all-page-main-title-wrapper">
				<div class="jhp-all-page-main-title">{$category.name}</div>
			</div>
			{if $category.description}
				<div id="category-description" class="text-muted col-md-7">{$category.description nofilter}</div>
			{/if}
            {if $category.image.large.url}
				<div class="jhp-category-cover col-md-5">
					<img src="{$category.image.large.url}" alt="{if !empty($category.image.legend)}{$category.image.legend}{else}{$category.name}{/if}">
				</div>
			{/if}
		</div>
		{* <div class="text-sm-center hidden-md-up">
			<h1 class="h1">{$category.name}</h1>
		</div> *}	

		{$jhp_child_category = Category::getChildren($category['id'], $language.id)}
		{if count($jhp_child_category) > 0}
		<div class='jhp-category-main-div clearfix'>
			<div class="jhp-main-category-title-wrapper">
				<div class="jhp-sub-category-title">{l s='Sous-catégories' d='Shop.Theme.Catalog'}</div>
			</div>
			{$count_cat = 1}
			{foreach $jhp_child_category as $category}
				{if $count_cat <= 5}
				<div class="jhp-sub-category-wrapper col-xs-6 col-sm-3 col-md-2 col-lg-2 col-xl-1">
					<div class="jhp-category-image">
                        <a href="{$link->getCategoryLink($category.id_category, $category.link_rewrite)|escape:'html':'UTF-8'}" title="{$category.name|escape:'html':'UTF-8'}" class="img">
                           
							{$tmp = {url entity='categoryImage' id=$category.id_category name='category_default'}}
							{if !file_exists({$tmp})}
								<img class="replace-2x" src="{$tmp}" alt="{$category.name|escape:'html':'UTF-8'}"  />
							{/if}
						</a>
					</div>
                    {*
					<div class="jhpcategory-name">
						<a class="category-name" href="{$link->getCategoryLink($category.id_category, $category.link_rewrite)|escape:'html':'UTF-8'}">{$category.name|escape:'html':'UTF-8'}</a>
					</div>
                    *}
				</div>
				{/if}
				{$count_cat = $count_cat + 1}
			{/foreach}
		</div>
		{/if}
{/block}
{/strip}

 

Edited by @rthur
typo (see edit history)
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...