lordbdp Posted September 27, 2013 Share Posted September 27, 2013 (edited) Bonjour, Je suis en train de mettre en place une règle panier (ex bon de réduction) afin d'offrir le port pour les habitants de ma commune. Je voudrais savoir comment faire pour avoir en illimité : Quantité totale disponible + Quantité disponible par utilisateur Merci d'avance. Edited March 4, 2014 by lordbdp (see edit history) Link to comment Share on other sites More sharing options...
lordbdp Posted September 30, 2013 Author Share Posted September 30, 2013 up ! Link to comment Share on other sites More sharing options...
lordbdp Posted October 4, 2013 Author Share Posted October 4, 2013 Personne ne connait de solution pour avoir un stock infini sur un produit ? Link to comment Share on other sites More sharing options...
Zebx Posted March 2, 2014 Share Posted March 2, 2014 Bonjour, A priori y a pas de solution prévue pour. Donc l'idée est sans doute de mettre un nombre extrêmement grand (le maximum étant 4294967295) La quantité totale restante est de toute façon visible dans la liste, donc on peut aussi facilement augmenter cette quantité +/- régulièrement. Pour la quantité par client, là le calcul et la quantité restante sont invisibles, mais ça peut être facilement court-circuité dans le code : Dans classes/CartRule.php (ligne 423 PS 1.5.6.2) : Remplacer : if ($quantityUsed + 1 > $this->quantity_per_user) return (!$display_error) ? false : Tools::displayError('You cannot use this voucher anymore (usage limit reached)'); Par ceci : if (($quantityUsed + 1 > $this->quantity_per_user) && $this->quantity_per_user != 0) return (!$display_error) ? false : Tools::displayError('You cannot use this voucher anymore (usage limit reached)'); Avec ce code en mettant une quantité à 0 par utilisateur, la quantité sera en réalité infinie 2 Link to comment Share on other sites More sharing options...
lordbdp Posted March 4, 2014 Author Share Posted March 4, 2014 Merci bcp 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