Jump to content

Ajouter du Texte en Mode Grille


StanH

Recommended Posts

Bonjour,

 

Je souhaiterais ajouter du texte lorsque les produits son en mode grille.

 

Actuellement, seul le nom, la photo et le prix s'affiche avec le bouton ajouter au panier et le bouton détail (mode grille).

 

J'aimerais ajouter une short description de quelques mots en plus du nom (sous le nom). 

 

Comment faire ? merci

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Merci pour votre retour, mais je suis novice.

 

j'ai trouvé le fichier et le code mais je ne sais pas ce que je dois modifier exactement. Pouvez me dire ce que je dois modifer pour pouvoir faire apparaître la short description. Je vous remercie beaucoup pour votre aide

 

Voici le code :

 

<!-- Products list --> {if isset($ptm_listproducts) && $ptm_listproducts == 3}{assign var='spanValue' value=4}{/if} {if isset($ptm_listproducts) && $ptm_listproducts == 4}{assign var='spanValue' value=3}{/if} {if isset($ptm_listproducts) && $ptm_listproducts == 5}{assign var='spanValue' value=2}{/if} {if isset($ptm_listproducts)} {assign var='nbItemsPerLine' value=$ptm_listproducts} {else} {assign var='nbItemsPerLine' value=4} {assign var='spanValue' value=3} {/if} <ul id="product_list" class="clearfix{if !isset($ptm_listdisplay) OR !isset($smarty.cookies.switchercookie) AND isset($ptm_listdisplay) AND $ptm_listdisplay == 1 OR isset($smarty.cookies.switchercookie) AND $smarty.cookies.switchercookie=="grid"} grid{/if}{if !isset($smarty.cookies.switchercookie) AND isset($ptm_listdisplay) AND $ptm_listdisplay == 0 OR isset($smarty.cookies.switchercookie) AND $smarty.cookies.switchercookie=="list"} list{/if}"> {foreach from=$products item=product name=products} <li class="ajax_block_product {if $smarty.foreach.products.index % 2}alternate_item{else}item{/if}{if $smarty.foreach.products.first} first_item{elseif $smarty.foreach.products.last} last_item{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last_item_of_line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first_item_of_line{/if} span{$spanValue}"> {if isset($product.new) && $product.new == 1}<a href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}"><span class="new">{l s='New'}</span></a>{/if} <div class="left_block"> <div class="product_img_container"> <a href="{$product.link|escape:'html':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'html':'UTF-8'}"> <img class="replace-2x" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'html':'UTF-8'}" {if isset($imgHomeSize)}width="{$imgHomeSize.width}" height="{$imgHomeSize.height}"{/if} /> </a> {if !isset($ptm_quickview) OR isset($ptm_quickview) AND $ptm_quickview == 1} <a class="quick-view" href="{$product.link|escape:'html':'UTF-8'}"> <span>{l s='Quick view'}</span> </a> {/if} </div> <h3><a href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}">{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}</a></h3> {if version_compare($smarty.const._PS_VERSION_,'1.6','>=')} {hook h='displayProductListReviews' product=$product} {/if} <p class="product_desc">{$product.description_short|strip_tags:'UTF-8'|truncate:100:'...'}</p> <a class="lnk_view" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View this product'}">{l s='View this product'}</a> </div> <div class="right_block"> {assign var='specific_prices' value=$product.specific_prices} {if isset($product.on_sale) && $product.on_sale && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE OR isset($product.reduction) && $product.reduction && isset($product.show_price) && $product.show_price && !$PS_CATALOG_MODE} {if isset($specific_prices.reduction_type) && $specific_prices.reduction_type} <p class="reduction">{if $specific_prices.reduction_type == 'percentage'}-{$specific_prices.reduction*100}%{/if}{if $specific_prices.reduction_type == 'amount'}-{convertPrice price=$specific_prices.reduction}{/if}</p> {/if} {/if} {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <p class="price_container"> {if isset($product.show_price) && $product.show_price} <span class="price">{if version_compare($smarty.const._PS_VERSION_,'1.6','>=')}{hook h="displayProductPriceBlock" product=$product type="before_price"}{/if}{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span> {if isset($product.on_sale) && $product.on_sale && $product.reduction > 0 OR isset($product.reduction) && $product.reduction && $product.reduction > 0}<span class="old_price_display">{if version_compare($smarty.const._PS_VERSION_,'1.6','>=')}{hook h="displayProductPriceBlock" product=$product type="old_price"}{/if}<span class="old_price">{convertPrice price=$product.price_without_reduction}</span></span>{/if} {/if} </p> {if version_compare($smarty.const._PS_VERSION_,'1.6','>=')} <div class="aeuc_block"> {hook h="displayProductPriceBlock" product=$product type="price"} {hook h="displayProductPriceBlock" product=$product type="weight"} {hook h="displayProductPriceBlock" product=$product type='after_price'} </div> {/if} {/if} {if isset($product.online_only) && $product.online_only}<p class="online_only">{l s='Online only !'}</p>{/if} {if isset($product.available_for_order) && $product.available_for_order && !$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT} {if ($product.allow_oosp AND $product.quantity > 0 || $product.quantity > 0)} <p class="available">{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='Available'}{/if}</p> {elseif ($product.allow_oosp AND $product.quantity <= 0 AND $product.quantity_all_versions <= 0)} <p class="available_later">{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='Preorder'}{/if}</p> {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)} <p class="available_later">{l s='Available with different options'}</p> {else} <p class="unavailable">{l s='Out of stock'}</p> {/if} {/if} {if !$product.available_for_order} <p class="unavailable">{l s='Unavailable product'}</p> {/if} </div> {if isset($comparator_max_item) && $comparator_max_item} <p class="compare"> <input type="checkbox" onclick="checkForComparison({$comparator_max_item})" id="comparator_item_{$product.id_product}" class="comparator" value="{$product.id_product}"/> <label for="comparator_item_{$product.id_product}">{l s='Select to compare'}</label> </p> {/if} {if isset($product.color_list) && $product.color_list} <div class="color-list-container">{$product.color_list}</div> {/if} <div> {if !isset($ptm_listbuttons) OR isset($ptm_listbuttons) AND $ptm_listbuttons != none} {if !isset($ptm_listbuttons) OR isset($ptm_listbuttons) AND ($ptm_listbuttons == view || $ptm_listbuttons == both)} <a class="button{if isset($ptm_listbuttons) AND $ptm_listbuttons == view} fullwidth{/if}" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}"><i class="icon-magnifier"></i></a> {/if} {if !isset($ptm_listbuttons) OR isset($ptm_listbuttons) AND ($ptm_listbuttons == addcart || $ptm_listbuttons == both)} {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0) && $product.available_for_order && $product.customizable != 2 && $product.minimal_quantity <= 1} <a rel="nofollow" class="exclusive ajax_add_to_cart_button{if isset($ptm_listbuttons) AND $ptm_listbuttons == addcart} fullwidth{/if}" data-id-product="{$product.id_product|intval}" href="{$link->getPageLink('cart.php', true)}?add=1&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} {if isset($product.quantity_all_versions) && $product.quantity_all_versions > 0} <span class="exclusive{if isset($ptm_listbuttons) AND $ptm_listbuttons == addcart} fullwidth{/if}">{l s='Limited stock'}</span> {elseif $product.available_for_order && (isset($product.quantity_all_versions) && $product.quantity_all_versions == 0 || $product.quantity <= 0)} <span class="exclusive{if isset($ptm_listbuttons) AND $ptm_listbuttons == addcart} fullwidth{/if}">{l s='Out of stock'}</span> {elseif !$product.available_for_order} <span class="exclusive{if isset($ptm_listbuttons) AND $ptm_listbuttons == addcart} fullwidth{/if}">{l s='Unavailable'}</span> {else} <span class="exclusive{if isset($ptm_listbuttons) AND $ptm_listbuttons == addcart} fullwidth{/if}">{l s='See details'}</span> {/if} {/if} {/if} {/if} {/if} </div> </li> {/foreach} </ul> <!-- /Products list -->{/if}

Edited by StanH (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...