Alexandre Posted May 7, 2018 Share Posted May 7, 2018 (edited) Bonjour, Je cherche un module qui permet d'avoir le "En stock" sans avoir à cliquer sur le produit, qu'il s'affiche juste en dessous? Ou s'il faut taper un peu de code dans le thème Cordialement Alexandre Edited May 7, 2018 by Alexandre (see edit history) Link to comment Share on other sites More sharing options...
doekia Posted May 7, 2018 Share Posted May 7, 2018 ma réponse la plus liminaire: oui Link to comment Share on other sites More sharing options...
Eolia Posted May 7, 2018 Share Posted May 7, 2018 Qui, quoi, où ? C'est natif ça ! Link to comment Share on other sites More sharing options...
Alexandre Posted May 7, 2018 Author Share Posted May 7, 2018 Re, Sur la 1.7 que vous détestez messieurs, je ne sais pas si c’est natif peut être que le theme que j’ai mis l’a enlevé. www.figurines-goodies.com Link to comment Share on other sites More sharing options...
Eolia Posted May 7, 2018 Share Posted May 7, 2018 On ne la deteste pas, on dit juste qu'elle n'est pas fonctionnelle. Donc je ne sais toujours pas de quel endroit vous parlez ? des product-list ? Si oui, le controleur envoie la variable de dispo au tpl En 1.6, le code dans le tpl ressemble à ça : {if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)} <span class="availability"> {if ($product.allow_oosp || $product.quantity > 0)} <span class="{if $product.quantity <= 0 && isset($product.allow_oosp) && !$product.allow_oosp} label-danger{elseif $product.quantity <= 0} label-warning{else} label-success{/if}"> {if $product.quantity <= 0}{if $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> {elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)} <span class="label-warning"> {l s='Product available with different options'} </span> {else} <span class="label-danger"> {l s='Out of stock'} </span> {/if} </span> {/if} {/if} Link to comment Share on other sites More sharing options...
Alexandre Posted May 7, 2018 Author Share Posted May 7, 2018 En gros ce que j'aimerais c'est comme sur la pièce jointe En stock et rupture de stock sans cliqué sur la fiche produits Link to comment Share on other sites More sharing options...
Eolia Posted May 7, 2018 Share Posted May 7, 2018 Bah il semblerait qu'ils aient viré l'affichage même dans le thème par défaut... Vous devriez avoir ce bout de code dans /themes/votre_theme/templates/catalog/_partials/miniatures/product.tpl {block name='product_quantities'} {if $product.show_quantities} <div class="product-quantities"> <label class="label">{l s='In stock' d='Shop.Theme.Catalog'}</label> <span>{$product.quantity} {$product.quantity_label}</span> </div> {/if} {/block} Link to comment Share on other sites More sharing options...
Alexandre Posted May 7, 2018 Author Share Posted May 7, 2018 Si je rentre le code que vous m'avez envoyer dans le fichier ça devrait marché logiquement? Cordialement Link to comment Share on other sites More sharing options...
Eolia Posted May 7, 2018 Share Posted May 7, 2018 Bah j'espère que vous comprenez au moins ce que fait ce code^^ Pas sûr que vous vouliez cette ligne: <SPAN>{$product.quantity} {$product.quantity_label}</SPAN> Link to comment Share on other sites More sharing options...
doekia Posted May 7, 2018 Share Posted May 7, 2018 Rectification, moi je la détecte la 1.7, elle a tué le peu de crédibilité de la solution Link to comment Share on other sites More sharing options...
Alexandre Posted May 9, 2018 Author Share Posted May 9, 2018 Re, J'aimerais juste avoir ' En Stock" en vert et "Rupture de stock" en rouge. Je le met ou dans le fichier, je met le fichier en PJ si vous voulez jeter un œil. Cordialement Alexandre product.tpl 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