kevkak Posted January 7, 2016 Share Posted January 7, 2016 Bonjour à tous j'ai un petit problème avec mon affichage de la disponibilité d'un produit. presta 1.6.1.2 gestion de stock avancée désactivée en gros j'autorise mes produits à être commandé même si j'ai plus de stock. -si mon produit a du stock il affiche "dispo" (normal) -si le stock de produit est à 0 il est commandable et affiche "sur commande 4 à 6 semaines" (normal) -mais imaginons que j'ai un produit où il reste 2 articles. le client ajoute en 1 (ca affiche donc dispo sur le produit et dans le panier) mais si il clic sur le bouton + pour ajouter d'autre pièce il peut monter à 3,4,5,... il reste affiché dispo. or une fois la quantité de 2 dépassée il devrait passer en "sur commande 4 à 6 semaine" sinon le client croit qu'il y a 3,4,5 en stock. le problème se situe aussi bien sur la fiche produit que dans le panier (car la disponibilité est affichée dans le panier aussi) je pense que mon bout de code doit comporter une erreur. pour la fiche produit ca devrait ce situer dans le product.tlp à cette ligne de code j'imagine: <!-- availability --> <p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) || ($product->quantity > 0 && !$product->available_now) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> {*<span id="availability_label">{l s='Availability:'}</span>*} <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span> </p> <p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties || $product->quantity <= 0) || $allow_oosp || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none"{/if} >{l s='Warning: Last items in stock!'}</p> <p id="availability_date"{if ($product->quantity > 0) || !$product->available_for_order || $PS_CATALOG_MODE || !isset($product->available_date) || $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}> <span id="availability_date_label">{l s='Availability date:'}</span> <span id="availability_date_value">{dateFormat date=$product->available_date full=false}</span> </p> et dans sur la fiche ca devrait se situer à cette ligne du shopping-cart-product-line.tlp </td> <td class="cart_avail"><span class="label{if $product.quantity_available <= 0 && isset($product.allow_oosp) && !$product.allow_oosp} label-danger{elseif $product.quantity_available <= 0} label-warning{else} label-success{/if}">{if $product.quantity_available <= 0}{if isset($product.allow_oosp) && $product.allow_oosp}{if isset($product.available_later) && $product.available_later}{$product.available_later}{else}{l s='In Stock'}{/if}{else}{l s='Out of stock'}{/if}{else}{if isset($product.available_now) && $product.available_now}{$product.available_now}{else}{l s='In Stock'}{/if}{/if}</span>{if !$product.is_virtual}{hook h="displayProductDeliveryTime" product=$product}{/if}</td> {/if} merci d'avance si quelqu'un à une solution. ma boutique n'est pas activée car en développement donc je ne peux pas donner mon adresse de site. 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