Jump to content

Supprimer la description courte de la fiche produit


Recommended Posts

Bonjour

 

j'utilise la version 1.4.4.1 de presta et sur mon template il y a un petit problème de référencement en effet, sur les pages catégories, l'affichage de la description courte apparait, mais elle apparait également dans la fiche produits. Il y a donc un DC interne.

Comment supprimer cette description courte de la fiche produit et la laisser visible sur la page de la catégorie.

 

Quels sont les lignes à supprimer et dans quels fichier si quelqu'un à déjà fait la modif.

 

Merci

Edited by Prouns (see edit history)

Share this post


Link to post
Share on other sites

Bonjour,

 

Il faut éditer la page product.tpl de votre thème.

 

Remplacez la partie suivante ( ou qui y ressemble selon le theme) :

 

{if $product->description_short OR $packItems|@count > 0}
       <div id="short_description_block">
           {if $product->description_short}
               <div id="short_description_content" class="rte align_justify">{$product->description_short}</div>
           {/if}
           {if $product->description}
           <p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p>
           {/if}
           {if $packItems|@count > 0}
               <h3>{l s='Pack content'}</h3>
               {foreach from=$packItems item=packItem}
                   <div class="pack_content">
                       {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>
                       <p>{$packItem.description_short}</p>
                   </div>
               {/foreach}
           {/if}
       </div>
       {/if}

 

par

 

{if $packItems|@count > 0}
       <div id="short_description_block">
      	   {if $packItems|@count > 0}
               <h3>{l s='Pack content'}</h3>
               {foreach from=$packItems item=packItem}
                   <div class="pack_content">
                       {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>
                       <p>{$packItem.description_short}</p>
                   </div>
               {/foreach}
           {/if}
       </div>
       {/if}

 

Ou si pas de pack, supprimez tout carrément.

 

N'oubliez pas de forcer le cache compile pour afficher la modification.

 

V++

 

Atch

Share this post


Link to post
Share on other sites

Cela n'a pas marché voici l'erreur obtenu

 

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/htdocs/themes/ATR110-TechnologyShopGrey1.4/product.tpl" on line 381 "{/if}" unexpected closing tag' in /htdocs/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 /htdocs/tools/smarty/sysplugins/smarty_internal_compilebase.php(145): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unexpected clos...', 381) #1 /htdocs/tools/smarty/sysplugins/smarty_internal_compile_if.php(172): Smarty_Internal_CompileBase->_close_tag(Array) #2 /htdocs/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(276): Smarty_Internal_Compile_Ifclose->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL) #3 /htdocs/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(123): Smarty_Internal_TemplateCompilerBase->callTagCompiler('ifclose', Array, Array) #4 /htdocs/tools/smarty/sysplugins/smarty_internal_templateparser.php(2382): Smarty_Internal_TemplateCompi in /htdocs/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431

 

 

voici ma partie du product tlp.

<!-- description -->
           {if $product->description_short OR $packItems|@count > 0}
           <div id="short_description_block">
               {if $product->description_short}
                   <div id="short_description_content" class="rte align_justify">{$product->description_short}</div>
               {/if}
               {if $product->description}
               <p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p>
               {/if}
               {if $packItems|@count > 0}
                   <h3>{l s='Pack content'}</h3>
                   {foreach from=$packItems item=packItem}
                       <div class="pack_content">
                           {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>
                           <p>{$packItem.description_short}</p>
                       </div>
                   {/foreach}
               {/if}
           </div>
           {/if}

           </form>
       {/if}
       {if $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}
   </div>
</div>

 

J'ai peut-être fait une erreur mais a part faire une copier-coller et se forcer le cache je vois pas

Share this post


Link to post
Share on other sites

y a pas tout le code là ? rassurez moi ;)

 

Essayez de supprimer tout cela :

 

  {if $product->description_short OR $packItems|@count > 0}
           <div id="short_description_block">
               {if $product->description_short}
                   <div id="short_description_content" class="rte align_justify">{$product->description_short}</div>
               {/if}
               {if $product->description}
               <p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p>
               {/if}
               {if $packItems|@count > 0}
                   <h3>{l s='Pack content'}</h3>
                   {foreach from=$packItems item=packItem}
                       <div class="pack_content">
                           {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a>
                           <p>{$packItem.description_short}</p>
                       </div>
                   {/foreach}
               {/if}
           </div>
           {/if}

 

V++

 

Atch

Share this post


Link to post
Share on other sites

Cela à marché mais j'ai supprimé uniquement la ligne

 

{if $product->description_short}
				<div id="short_description_content" class="rte align_justify">{$product->description_short}</div>
			{/if}

 

Car je souhaitait garder le bouton plus de détail

 

Merci

Edited by Prouns (see edit history)

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More