omhesgwsopmjg Posted February 11, 2014 Share Posted February 11, 2014 (edited) Hello, I have products with several combinations, each one has a minimum quantity and I just can increment by a multiple of the minimum quantity of such combination. What I want is that when I choose a certain combination with a minimal quantity, I increment of the minimum quantity of the default combination. For example: Default : 400g white cloth, min qty 10 => multiple of 10 Others : 400g red cloth, min qty 100 = > multiple of 10 Instead of taking the minimum value of this product, it will be replaced by the value of the product with the default combination. It is certainly possible to save the minimum value of the default combination when the page is loaded, and then, once you choose a combination, parameters are added to the url, the minimum value is updated, but not page charged. I already have changed a part of my code to increment of a multiple of such quantity combination with this code : // In processChangeProductInCart() of CartController // collisage par qte min if ((int)$this->id_product_attribute) $minimal_quantity = Attribute::getAttributeMinimalQty($this->id_product_attribute); else $minimal_quantity = $product->minimal_quantity; if ($this->qty % $minimal_quantity != 0) { $this->errors[] = Tools::displayError('You can only only add this item to your cart with a quantity multiple of ').' '.$minimal_quantity; } // fin col par qte min // must be added after this // If no errors, process product addition if (!$this->errors && $mode == 'add') { // and before // Add cart if no cart found if (!$this->context->cart->id) { Someone to tell me if it seems possible? Thank you for helping me. Edited February 11, 2014 by toeuvray (see edit history) Link to comment Share on other sites More sharing options...
omhesgwsopmjg Posted February 25, 2014 Author Share Posted February 25, 2014 Up, please Link to comment Share on other sites More sharing options...
stanleyek18 Posted September 3, 2014 Share Posted September 3, 2014 I'm also interested in that. Still looking for solution. Link to comment Share on other sites More sharing options...
vekia Posted April 25, 2016 Share Posted April 25, 2016 solution is here: minimum product quantity module that accepts only defined values (multiplied like 5,10,15,20 or 10,20,30,40,50 or 50,100,150,200 etc.) Link to comment Share on other sites More sharing options...
Desclosf Posted February 26, 2017 Share Posted February 26, 2017 solution is here: minimum product quantity module that accepts only defined values (multiplied like 5,10,15,20 or 10,20,30,40,50 or 50,100,150,200 etc.) Hi Vekia Your module seems be the one I'm looking for unfortunately the demo site you propose doesn't seems to have this module installed Is the module compatible with multiple store ? Thanks Link to comment Share on other sites More sharing options...
Escoline_CA Posted October 15, 2021 Share Posted October 15, 2021 On 25/4/2016 at 14:52, vekia said: la soluzione è qui: modulo quantità minima di prodotto che accetta solo valori definiti (moltiplicati come 5,10,15,20 o 10,20,30,40,50 o 50,100,150,200 ecc.) Hi Vekia, is this module still available, or do you have something similar? I would really need it. Thank you in advance 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