laurentg Posted February 1, 2013 Share Posted February 1, 2013 (edited) Bonjour à tous , voila je suis en train de personnaliser mes fiches produits et je cherche à ce que la description courte suivi de "plus d'infos" ne dépasse pas un nombre spécifique de caractères . sachant que mes produits non pas de description courte et qu'il reprend en partis la description longue . en ayant bien chercher je ne trouve pas ou mettre ou modifier cette limite un peu d'aide serait le bienvenue.......:-) merci Edited February 2, 2013 by laurentg (see edit history) Link to comment Share on other sites More sharing options...
Superbegood31 Posted February 1, 2013 Share Posted February 1, 2013 Il s'agit de la fonction TRUNCATE... @ bientôt Link to comment Share on other sites More sharing options...
laurentg Posted February 1, 2013 Author Share Posted February 1, 2013 merci , mais ou touve t on cette fonction ? dans quel fichier ? doit on la rajouter ? Link to comment Share on other sites More sharing options...
aliancedev Posted February 1, 2013 Share Posted February 1, 2013 Salut, Tu vas dans le fichier product.tpl de ta template, et tu remplace ca {$product->description} par ca {$product->description|truncate:20} // je suppose que tu veux 20 caractere, mais tu peux mettre ce que tu ve a la place de 20 Link to comment Share on other sites More sharing options...
Superbegood31 Posted February 1, 2013 Share Posted February 1, 2013 Si vous vous souhaitez travailler sur votre fiche produit : themes/votretheme/product.tpl <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|[b]truncate[/b]:400:'...'}</a> Il ne vous reste plus qu'à diminuer la valeur 400 par exemple Link to comment Share on other sites More sharing options...
laurentg Posted February 1, 2013 Author Share Posted February 1, 2013 merci à vous messieurs , j'essaie cela et je vous dis Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now