Grafyx89 Posted April 25, 2019 Posted April 25, 2019 (edited) Bonjour à tous, J'aimerais trouvé une variable capable de mettre un minimum de quantité selon le groupe. Pour le fait : J'ai un groupe PRO, qui dois avoir minimum 2 quantité dans son panier, pour pouvoir ajouter au panier. J'ai testé ceci, mais ça n'a pas l'air d'être fonctionnel ^^ {if $product.minimal_quantity < 2 || $customer.id_default_group==4} {l s='The minimum purchase order quantity for the product is 2.' } {l s='On affiche ici'} {/if} Merci pour votre aide, Bien à vous , Jonathan Edited April 25, 2019 by Grafyx89 (see edit history) Share this post Link to post Share on other sites More sharing options...
joseantgv Posted April 25, 2019 Posted April 25, 2019 Minimum de 2 unités par produit? Share this post Link to post Share on other sites More sharing options...
Grafyx89 Posted April 25, 2019 Posted April 25, 2019 (edited) 17 minutes ago, joseantgv said: Minimum de 2 unités par produit? Oui tout à fait Pardon de mon oublie, je suis sur prestashop 1.7 Edited April 25, 2019 by Grafyx89 oublie (see edit history) Share this post Link to post Share on other sites More sharing options...
Grafyx89 Posted April 25, 2019 Posted April 25, 2019 J'ai essayé ainsi : <div class="add" {if $product.minimal_quantity < 2 || $customer.id_default_group==4} style="display:none;" {else} if $product.minimal_quantity > 2 || $customer.id_default_group==4} style="display:block;" {/if} > <button class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit" {if !$product.add_to_cart_url} disabled {/if} > <i class="material-icons shopping-cart"></i> {l s='Add to cart' d='Shop.Theme.Actions'} </button> </div> Mais il reste en "Display:none;" même au delà de 2 Share this post Link to post Share on other sites More sharing options...
Grafyx89 Posted April 25, 2019 Posted April 25, 2019 37 minutes ago, joseantgv said: Minimum de 2 unités par produit? Oui tout à fait Share this post Link to post Share on other sites More sharing options...
Grafyx89 Posted April 25, 2019 Posted April 25, 2019 @joseantgv oui tout à fait. Je suis désolé, galère pour posté des post, j'ai un "Hidden" sur la plupart des post ... Merci de ton retour Share this post Link to post Share on other sites More sharing options...
Grafyx89 Posted April 25, 2019 Posted April 25, 2019 Oui à fait Share this post Link to post 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