anne4113 Posted April 6, 2012 Share Posted April 6, 2012 Bonjour, voici mon problème : lorsque j'ai par exemple un produit qui a un stock à 2 et que le client commande 3 produits (car il est commandable hors stock), dans le panier, le produit continue d'apparaître comme disponible. Comment faire pour que le produit apparaisse "disponible bientôt" ? Merci. Link to comment Share on other sites More sharing options...
anne4113 Posted April 6, 2012 Author Share Posted April 6, 2012 En gros je pense qu'il faudrait faire des modifs là, mais je ne sais pas comment faire : (En noir, c'est ce que j'ai déjà et qui marche bien, j'ai juste rajouté une icône pour les produits en précommande) {if $product.active AND $product.stock_quantity > 0 } <img src="{$img_dir}icon/available.gif" alt="{l s='Available'}" title="{l s='Available'}" /> {elseif $product.allow_oosp } <img src="{$img_dir}icon/availablesoon.gif" alt="{l s='Available Soon'}" title="{l s='Available Soon'}" /> {elseif $product.allow_oosp AND quantité du panier > quantité du stock} <img src="{$img_dir}icon/availablesoon.gif" alt="{l s='Available Soon'}" title="{l s='Available Soon'}" /> {else} <img src="{$img_dir}icon/unavailable.gif" alt="{l s='Out of stock'}" title="{l s='Out of stock'}" /> {/if} Link to comment Share on other sites More sharing options...
anne4113 Posted April 6, 2012 Author Share Posted April 6, 2012 Est-ce que ça, ça irait ? J'ose pas le tester car j'ai du monde sur mon site et j'ai pas envie de le planter... {if $product.active AND $product.stock_quantity > 0 } <img src="{$img_dir}icon/available.gif" alt="{l s='Available'}" title="{l s='Available'}" /> {elseif $product.allow_oosp } <img src="{$img_dir}icon/availablesoon.gif" alt="{l s='Available Soon'}" title="{l s='Available Soon'}" /> {elseif $product.allow_oosp AND $ajax_cart_quantity > $product.stock_quantity} <img src="{$img_dir}icon/availablesoon.gif" alt="{l s='Available Soon'}" title="{l s='Available Soon'}" /> {else} <img src="{$img_dir}icon/unavailable.gif" alt="{l s='Out of stock'}" title="{l s='Out of stock'}" /> {/if} Link to comment Share on other sites More sharing options...
anne4113 Posted April 7, 2012 Author Share Posted April 7, 2012 Bon... Ca marche pas... A mon avis, c'est le $ajax_cart_quantity qui va pas, mais je sais pas quoi mettre comme variable. Vraiment personne pour m'aider ? Link to comment Share on other sites More sharing options...
anne4113 Posted April 7, 2012 Author Share Posted April 7, 2012 J'ai essayé ça : <td class="cart_availability"> {if $product.active AND $product.stock_quantity > 0 } <img src="{$img_dir}icon/available.gif" alt="{l s='Available'}" title="{l s='Available'}" /> {elseif $product.allow_oosp AND $cart_quantity > $product.stock_quantity} <img src="{$img_dir}icon/availablesoon.gif" alt="{l s='Available Soon'}" title="{l s='Available Soon'}" /> {elseif $product.allow_oosp } <img src="{$img_dir}icon/availablesoon.gif" alt="{l s='Available Soon'}" title="{l s='Available Soon'}" /> {else} <img src="{$img_dir}icon/unavailable.gif" alt="{l s='Out of stock'}" title="{l s='Out of stock'}" /> {/if} </td> Et bien d'autres et ça marche pas non plus, je suis en train de devenir chèvre !!! Personne pour un peu d'aide ? Link to comment Share on other sites More sharing options...
anne4113 Posted April 23, 2012 Author Share Posted April 23, 2012 Up, je n'ai toujours pas trouvé de solution... Link to comment Share on other sites More sharing options...
Krystel Posted April 25, 2012 Share Posted April 25, 2012 Je ne peux pas t'aider parce que j'ai le même problème mais pas la solution. Si il y avait quelqu'un pour nous éclairer ce serait sympa. Link to comment Share on other sites More sharing options...
anne4113 Posted April 30, 2012 Author Share Posted April 30, 2012 Toujours personne pour un peu d'aide ? 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