Jump to content

Suppression Descriptif Catégorie


Recommended Posts

salut,

 

ça se passe dans le fichier categoy.tpl de ton thème....

 

il faut mettre en commentaire {* *} les choses que tu ne souhaites pas afficher (Scène/image, description et sous categorie).

 

par exemple pour la scene/image tu dois avoir quelque chose comme ça :

{if $scenes}
  <!-- Scenes -->
  {include file="$tpl_dir./scenes.tpl" scenes=$scenes}
 {else}
  <!-- Category image -->
  {if $category->id_image}
  <div class="align_center">
   <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
  </div>
  {/if}
 {/if}

 

et bien encadre le avec les commentaires comme ceci :

{*
{if $scenes}
  <!-- Scenes -->
  {include file="$tpl_dir./scenes.tpl" scenes=$scenes}
 {else}
  <!-- Category image -->
  {if $category->id_image}
  <div class="align_center">
   <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
  </div>
  {/if}
 {/if}
*}

 

faire la même chose avec le reste....

Link to comment
Share on other sites

Voici le code, merci de votre aide

---------------------------------------------------------------------------------------------------------------------------------------

 

 

{include file="$tpl_dir./breadcrumb.tpl"}
{include file="$tpl_dir./errors.tpl"}
{if isset($category)}
{if $category->id AND $category->active}
{*{include file="$tpl_dir./product-sort.tpl"}*}
 <h1 class="category_title">
  {strip}
  {$category->name|escape:'htmlall':'UTF-8'}
   <span class="category-product-count">
 {include file="$tpl_dir./category-count.tpl"}
   </span>
  {/strip}
 </h1>
 {if $scenes}
  <!-- Scenes -->
  {include file="$tpl_dir./scenes.tpl" scenes=$scenes}
 {else}
  <!-- Category image -->
  <div class="category_img">
  {if $category->id_image}
   <div class="align_center">
   <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
   </div>
  {/if}
  </div>
  {if $category->description}
   <div class="cat_desc" {if !isset($subcategories)}style="height:230px"{/if}>{$category->description}</div>
  {/if}
 {/if}
 {if isset($subcategories)}
 <!-- Subcategories -->
 <div id="subcategories">
  {*<h3>{l s='Subcategories'}</h3>*}
  <ul class="inline_list">
  {foreach from=$subcategories item=subcategory}
   <li>
 <a 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, 'subcategory')}" alt="" />
  {else}
   <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
  {/if}
 </a>
 <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
   </li>
  {/foreach}
  </ul>
  <br class="clear"/>
 </div>
 {/if}

 <div class="clear"></div>
 {if $products}
   {*{include file="$tpl_dir./product-compare.tpl"}*}
   {include file="$tpl_dir./pagination.tpl"}
   {include file="$tpl_dir./product-list.tpl" products=$products}
   {*{include file="$tpl_dir./product-compare.tpl"}*}
   {include file="$tpl_dir./pagination.tpl"}
  {elseif !isset($subcategories)}
   <p class="warning">{l s='There are no products in this category.'}</p>
  {/if}
{elseif $category->id}
 <p class="warning">{l s='This category is currently unavailable.'}</p>
{/if}
{/if}

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

ah la je pressens que vous n'avez pas vidé vos caches!!

 

rendez-vous dans BO > Préférences > Performances

Forcer la compilation --> Oui

Cache --> Non

 

une fois les modifications prises en compte remettre comme à l'origine

 

il y a cache et cache, en temps normal les fichiers compilés sont dans \tools\smarty\compile, sauf que certains fichiers comme pour les catégories sont dans \tools\smarty\cache, c'est un cache dont les données ne changent pas "tous les jours".

 

Il faut donc effacer les fichiers qui sont dans \tools\smarty\cache sauf le fichier index.php

Link to comment
Share on other sites

oui, coeos.pro a raison.

 

je reprends ton code avec la partie commentée :

{include file="$tpl_dir./breadcrumb.tpl"}
{include file="$tpl_dir./errors.tpl"}
{if isset($category)}
{if $category->id AND $category->active}
{*{include file="$tpl_dir./product-sort.tpl"}*}
 <h1 class="category_title">
  {strip}
  {$category->name|escape:'htmlall':'UTF-8'}
   <span class="category-product-count">
	 {include file="$tpl_dir./category-count.tpl"}
   </span>
  {/strip}
 </h1>
{*
 {if $scenes}
  <!-- Scenes -->
  {include file="$tpl_dir./scenes.tpl" scenes=$scenes}
 {else}
  <!-- Category image -->
  <div class="category_img">
  {if $category->id_image}
   <div class="align_center">
   <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" />
   </div>
  {/if}
  </div>
  {if $category->description}
   <div class="cat_desc" {if !isset($subcategories)}style="height:230px"{/if}>{$category->description}</div>
  {/if}
 {/if}
*}
 {if isset($subcategories)}
 <!-- Subcategories -->
 <div id="subcategories">
  {*<h3>{l s='Subcategories'}</h3>*}
  <ul class="inline_list">
  {foreach from=$subcategories item=subcategory}
   <li>
	 <a 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, 'subcategory')}" alt="" />
	  {else}
	   <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
	  {/if}
	 </a>
	 <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
   </li>
  {/foreach}
  </ul>
  <br class="clear"/>
 </div>
 {/if}

 <div class="clear"></div>
 {if $products}
   {*{include file="$tpl_dir./product-compare.tpl"}*}
   {include file="$tpl_dir./pagination.tpl"}
   {include file="$tpl_dir./product-list.tpl" products=$products}
   {*{include file="$tpl_dir./product-compare.tpl"}*}
   {include file="$tpl_dir./pagination.tpl"}
  {elseif !isset($subcategories)}
   <p class="warning">{l s='There are no products in this category.'}</p>
  {/if}
{elseif $category->id}
 <p class="warning">{l s='This category is currently unavailable.'}</p>
{/if}
{/if}

 

faites la petie moulinette que je vous ai indiqué ainsi que celle de coeos.pro et cela devrait être ok ;)

Link to comment
Share on other sites

  • 6 months 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...