missou55 Posted July 15, 2010 Share Posted July 15, 2010 Bonjour,J'aimerai savoir comment faire pour afficher le champs quantité d'une fiche produit seulement sur une seule catégorie.J'ai été sur le fichier product.tpl et de la, il y un bout de code qui affiche le champs de quantité : <!-- quantity wanted --> quantity == 0) || $virtual} style="display:none;"{/if}> {l s='Quantity :'} <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> Mais j'aimerai l'afficher seulement si id_category=11 .Il faut donc faire un if...Merci de votre aide Link to comment Share on other sites More sharing options...
Christophe Boix Posted July 15, 2010 Share Posted July 15, 2010 Bonjour {if $category->id==11){ <!-- quantity wanted --> quantity == 0) || $virtual} style="display:none;"{/if}> {l s='Quantity :'} <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> } Link to comment Share on other sites More sharing options...
missou55 Posted July 15, 2010 Author Share Posted July 15, 2010 Merci,Je pense qu'il faut fermer le if a la fin ?Je vais tester Link to comment Share on other sites More sharing options...
Christophe Boix Posted July 15, 2010 Share Posted July 15, 2010 Pardon j'ai été un peu vite... a la fin c'est bien {/if} au lieu de } {if $category->id==11){<!-- quantity wanted -->quantity == 0) || $virtual} style="display:none;"{/if}>{l s='Quantity :'} <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> {/if} et ça devrait marcher.Bonne soirée 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