[Skip to main content](#vessel-content)

#   Minimum quantity ignored at checkout

##

- **[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")**
- [![iedwards's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12400-iedwards "View iedwards's Profile") Topic Author
- [ Offline](/forum/user/12400-iedwards)

Less More

- Posts: 250
- Thank you received: 7
- [](http://www.estm.co.uk)
-

10 years 1 month ago -  10 years 1 month ago [\#250824](#250824) by [iedwards](/forum/user/12400-iedwards "View iedwards's Profile")  *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#250824 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")* was created by *[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")*

-- url of the page with the problem -- : [ www.artistpapers.co.uk](https://www.artistpapers.co.uk)
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2
-- PHP version -- : 7.0.10

Hi,

We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!

EXAMPLE:

Add five of S401-10 a variant of [ ](https://www.artistpapers.co.uk/shop/drawing-and-illustration-paper/drawing-paper/strathmore-400-series-heavyweight-drawing)[ www.artistpapers.co.uk/shop/drawing-and-...-heavyweight-drawing](https://www.artistpapers.co.uk/shop/drawing-and-illustration-paper/drawing-paper/strathmore-400-series-heavyweight-drawing)

[ ![Capture&#95;2016-09-26.jpg](/forum/attachment/33659) ](/forum/attachment/33659 "...2016-09-26.jpg")

Go to cart to checkout and it's showing five items at the correct price
[ ![Capture1&#95;2016-09-26.jpg](/forum/attachment/33660) ](/forum/attachment/33660 "...2016-09-26.jpg")

Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE
[ ![Capture2&#95;2016-09-26.jpg](/forum/attachment/33661) ](/forum/attachment/33661 "...2016-09-26.jpg")

An urgent solution to this would be appreciated.

Many thanks,

Ian

---

[ Ian Edwards Film Sound Recording](https://estm.co.uk)
[ Alveley Mining Heritage](https://alveleyminingheritage.org)
[ Mary Edwards-Porter - Author](https://www.mary-edwards-porter.co.uk)

- [ ![Capture&#95;2016-09-26.jpg](/forum/attachment/33659) ](/forum/attachment/33659 "...2016-09-26.jpg") [ ](/forum/attachment/33659?download=1 "...2016-09-26.jpg")
- [ ![Capture1&#95;2016-09-26.jpg](/forum/attachment/33660) ](/forum/attachment/33660 "...2016-09-26.jpg") [ ](/forum/attachment/33660?download=1 "...2016-09-26.jpg")
- [ ![Capture2&#95;2016-09-26.jpg](/forum/attachment/33661) ](/forum/attachment/33661 "...2016-09-26.jpg") [ ](/forum/attachment/33661?download=1 "...2016-09-26.jpg")

Last edit: 10 years 1 month ago by [iedwards](/forum/user/12400-iedwards "View iedwards's Profile"). Reason: corrected link

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

10 years 1 month ago [\#250825](#250825) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#250825 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi,

I can only think that there is a problem with the settings of the product/variant as I'm not able to reproduce the issue on my end.
Could you provide screenshots of their settings ?
If you want an easy solution, you can change the "quantity input" setting of the product to be displayed as a dropdown so that only the possible values can be selected in the quantity field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")**
- [![iedwards's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12400-iedwards "View iedwards's Profile") Topic Author
- [ Offline](/forum/user/12400-iedwards)

Less More

- Posts: 250
- Thank you received: 7
- [](http://www.estm.co.uk)
-

10 years 1 month ago [\#250863](#250863) by [iedwards](/forum/user/12400-iedwards "View iedwards's Profile")  Replied by *[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#250863 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi Nicolas,

Thank you for the reply.

Attached are screen shots of the parent product and variant settings.

Ian

---

[ Ian Edwards Film Sound Recording](https://estm.co.uk)
[ Alveley Mining Heritage](https://alveleyminingheritage.org)
[ Mary Edwards-Porter - Author](https://www.mary-edwards-porter.co.uk)

- [ ![Capture&#95;2016-09-27.jpg](/forum/attachment/33667) ](/forum/attachment/33667 "...2016-09-27.jpg") [ ](/forum/attachment/33667?download=1 "...2016-09-27.jpg")
- [ ![Capture1&#95;2016-09-27.jpg](/forum/attachment/33668) ](/forum/attachment/33668 "...2016-09-27.jpg") [ ](/forum/attachment/33668?download=1 "...2016-09-27.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

10 years 1 month ago [\#250868](#250868) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#250868 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi,

I see that you have several variants for the same values in your variants listing.
That should normally not be possible. It must come from a wrongly written CSV import.
Maybe it is linked to that ?

Try with a clean product where you don't have that.

Otherwise, try after changing the code: Code:

$row-&gt;product_quantity_layout = $cart-&gt;products[$row-&gt;cart_product_parent_id]-&gt;product_quantity_layout; $row-&gt;product_min_per_order = $cart-&gt;products[$row-&gt;cart_product_parent_id]-&gt;product_min_per_order; $row-&gt;product_max_per_order = $cart-&gt;products[$row-&gt;cart_product_parent_id]-&gt;product_max_per_order;

to: Code:

if(empty($row-&gt;product_quantity_layout)) $row-&gt;product_quantity_layout = $cart-&gt;products[$row-&gt;cart_product_parent_id]-&gt;product_quantity_layout; if(empty($row-&gt;product_min_per_order)) $row-&gt;product_min_per_order = $cart-&gt;products[$row-&gt;cart_product_parent_id]-&gt;product_min_per_order; if(empty($row-&gt;product_max_per_order)) $row-&gt;product_max_per_order = $cart-&gt;products[$row-&gt;cart_product_parent_id]-&gt;product_max_per_order;

in the file administrator/components/com_hikashop/classes/cart.php

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")**
- [![iedwards's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12400-iedwards "View iedwards's Profile") Topic Author
- [ Offline](/forum/user/12400-iedwards)

Less More

- Posts: 250
- Thank you received: 7
- [](http://www.estm.co.uk)
-

10 years 1 month ago [\#250917](#250917) by [iedwards](/forum/user/12400-iedwards "View iedwards's Profile")  Replied by *[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#250917 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi Nicolas,

It's not a wrongly written csv import, that is how the products are, I can't change the products!

I'll try the code changes and report back.

Many thanks,

Ian

---

[ Ian Edwards Film Sound Recording](https://estm.co.uk)
[ Alveley Mining Heritage](https://alveleyminingheritage.org)
[ Mary Edwards-Porter - Author](https://www.mary-edwards-porter.co.uk)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")**
- [![iedwards's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12400-iedwards "View iedwards's Profile") Topic Author
- [ Offline](/forum/user/12400-iedwards)

Less More

- Posts: 250
- Thank you received: 7
- [](http://www.estm.co.uk)
-

9 years 10 months ago [\#257597](#257597) by [iedwards](/forum/user/12400-iedwards "View iedwards's Profile")  Replied by *[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#257597 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi Nicolas,

I had forgotten to implement this but have had the same problem again so I have now made the code changes to cart.php.

It does at least detect the minimum order quantity now but still allows the user to change the quantity below the minimum in the cart. So in the screen shot the minimum order quantity is 5 but the customer is able to change it to 3, and because there isn't a price set for less than five the cart offers it for free.

[ ![Capture&#95;2016-12-13.JPG](/forum/attachment/35181) ](/forum/attachment/35181 "...2016-12-13.JPG")

Ian

---

[ Ian Edwards Film Sound Recording](https://estm.co.uk)
[ Alveley Mining Heritage](https://alveleyminingheritage.org)
[ Mary Edwards-Porter - Author](https://www.mary-edwards-porter.co.uk)

- [ ![Capture&#95;2016-12-13.JPG](/forum/attachment/35181) ](/forum/attachment/35181 "...2016-12-13.JPG") [ ](/forum/attachment/35181?download=1 "...2016-12-13.JPG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

9 years 10 months ago [\#257599](#257599) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#257599 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi,

We're currently wrapping up the beta of HikaShop 3 which has a completely new cart system and which should handle that properly. So it would be great if you could try that out with the beta when we release it this week.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")**
- [![iedwards's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12400-iedwards "View iedwards's Profile") Topic Author
- [ Offline](/forum/user/12400-iedwards)

Less More

- Posts: 250
- Thank you received: 7
- [](http://www.estm.co.uk)
-

9 years 10 months ago [\#257689](#257689) by [iedwards](/forum/user/12400-iedwards "View iedwards's Profile")  Replied by *[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#257689 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi Nicolas,

I'm certainly looking forward to trying the new version, but it may be a while before that's released ready to put on a live site. Is there any possibility of a fix for this in the current version? The cart does now detect if the quantity is changed below the minimum as it gives the user a warning message, but it still allows the user to proceed with the order, the problem being that they then get the item free as there is no price for quantities below the minimum.

The warning message is fine but I could do with it setting the quantity back to the minimum value again. Can that be done?

Thanks,

Ian

---

[ Ian Edwards Film Sound Recording](https://estm.co.uk)
[ Alveley Mining Heritage](https://alveleyminingheritage.org)
[ Mary Edwards-Porter - Author](https://www.mary-edwards-porter.co.uk)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14283
-
-

9 years 10 months ago -  9 years 10 months ago [\#257724](#257724) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#257724 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi,

Then try to change the code: Code:

function check_cart(){ $cart = $this-&gt;initCart(); if(empty($cart-&gt;products) &#124;&#124; !is_array($cart-&gt;products) &#124;&#124; !count($cart-&gt;products)){ $app = JFactory::getApplication(); $app-&gt;redirect( $this-&gt;redirect_url, JText::_('CART_EMPTY')); } return true; }

to: Code:

function check_cart(){ $cart = $this-&gt;initCart(); if(empty($cart-&gt;products) &#124;&#124; !is_array($cart-&gt;products) &#124;&#124; !count($cart-&gt;products)){ $app = JFactory::getApplication(); $app-&gt;redirect( $this-&gt;redirect_url, JText::_('CART_EMPTY')); } foreach($cart-&gt;products as $i =&gt; $row) { if(empty($row-&gt;cart_product_quantity)) continue; if(!empty($row-&gt;product_min_per_order)) { if($row-&gt;product_min_per_order&gt;$row-&gt;cart_product_quantity) { $app-&gt;enqueueMessage(JText::sprintf('YOU_NEED_TO_ORDER_AT_LEAST_X_X',$row-&gt;product_min_per_order,$row-&gt;product_name)); return false; } } } return true; }

in the file components/com_hikashop/controllers/checkout.php

Last edit: 9 years 10 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")**
- [![iedwards's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12400-iedwards "View iedwards's Profile") Topic Author
- [ Offline](/forum/user/12400-iedwards)

Less More

- Posts: 250
- Thank you received: 7
- [](http://www.estm.co.uk)
-

9 years 10 months ago [\#257778](#257778) by [iedwards](/forum/user/12400-iedwards "View iedwards's Profile")  Replied by *[iedwards](/forum/user/12400-iedwards "View iedwards's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#257778 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi Nicolas,

Thank you for that, it's stopping customers going below the minimum quantity. I'm not seeing the warning message any more though, but I can live with that.

Ian

---

[ Ian Edwards Film Sound Recording](https://estm.co.uk)
[ Alveley Mining Heritage](https://alveleyminingheritage.org)
[ Mary Edwards-Porter - Author](https://www.mary-edwards-porter.co.uk)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")**
- [![leitzdesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39770.png)](/forum/user/39770-leitzdesign "View leitzdesign's Profile")
- [ Offline](/forum/user/39770-leitzdesign)

Less More

- Posts: 32
- Thank you received: 0
-
-

9 years 9 months ago -  9 years 9 months ago [\#261020](#261020) by [leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")  Replied by *[leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#261020 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

I am experiencing the same issue. I have certain products with minimum quantity requirements. In the example shown in my screenshots, a minimum of 12 items must be purchased. If the user adds 12 to the cart, everything is fine. However, if a quantity less than 12 is added, the price shows "Free."

Product: [ avofks.com/ufcw-store/international/oute...lished-knit-hat.html](http://avofks.com/ufcw-store/international/outerwear/product/embellished-knit-hat.html)

I attempted the code change found in this post, but I do not have that exact code to replace.
[ www.hikashop.com/support/forum/checkout/...checkout.html#250868](https://www.hikashop.com/support/forum/checkout/886601-minimum-quantity-ignored-at-checkout.html#250868)

I did make the code change found in this post.
[ www.hikashop.com/support/forum/checkout/...checkout.html#257724](https://www.hikashop.com/support/forum/checkout/886601-minimum-quantity-ignored-at-checkout.html#257724)

However, I still have the same problem. This is a live site so I need to resolve the issue quickly.

Please advise.

- [ ![ScreenShot2017-01-31at8.08.15PM.png](/forum/attachment/35981) ](/forum/attachment/35981 "...t8.08.15PM.png") [ ](/forum/attachment/35981?download=1 "...t8.08.15PM.png")
- [ ![ScreenShot2017-01-31at8.08.54PM.png](/forum/attachment/35982) ](/forum/attachment/35982 "...t8.08.54PM.png") [ ](/forum/attachment/35982?download=1 "...t8.08.54PM.png")
- [ ![ScreenShot2017-01-31at8.09.39PM.png](/forum/attachment/35983) ](/forum/attachment/35983 "...t8.09.39PM.png") [ ](/forum/attachment/35983?download=1 "...t8.09.39PM.png")

Last edit: 9 years 9 months ago by [leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile"). Reason: Added product link

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

9 years 9 months ago [\#261056](#261056) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#261056 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi,

Your problem configuration is not good.
Where did you configure the unit price for quantity between 1 and 11 ?
Where did you configure the product to refuse a quantity below 12 ?

[ www.hikashop.com/support/documentation/2...orm.html#restriction](https://www.hikashop.com/support/documentation/20-documentation/hikashop/tutorials/19-hikashop-product-form.html#restriction)
If you want to force the user to have 12 unit min ; you must configure the product min per order in that way ; not the price.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")**
- [![leitzdesign's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39770.png)](/forum/user/39770-leitzdesign "View leitzdesign's Profile")
- [ Offline](/forum/user/39770-leitzdesign)

Less More

- Posts: 32
- Thank you received: 0
-
-

9 years 9 months ago [\#261128](#261128) by [leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")  Replied by *[leitzdesign](/forum/user/39770-leitzdesign "View leitzdesign's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#261128 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Jerome,
Thank you for the additional information. I have set the product to refuse a quantity below 12. There is no unit price for quantity between 1 and 11 as quantities below 12 are not allowed. Should that be indicated somewhere or does the cart infer that information?

Now, product forces a quantity of 12 before adding to cart - That's great.

However, once the quantity of 12 (or greater) is added to the cart, the amount can be changed. If the user changes the amount to be less than twelve, the following error is displayed:

**"Limit reached. You can't add the product: Embellished Knit Hat: Gold Rhinestone"**

This message is incorrect as there is no maximum number; it is set to "unlimited." I feel the error should indicate a minimum amount must be purchased. I have already replaced the code as indicated in this post:
[ www.hikashop.com/support/forum/checkout/...checkout.html#257724](https://www.hikashop.com/support/forum/checkout/886601-minimum-quantity-ignored-at-checkout.html#257724)

Please advise.

- [ ![ScreenShot2017-02-01at8.12.38PM.png](/forum/attachment/36012) ](/forum/attachment/36012 "...t8.12.38PM.png") [ ](/forum/attachment/36012?download=1 "...t8.12.38PM.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

9 years 9 months ago [\#261175](#261175) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Minimum quantity ignored at checkout](/forum/27-checkout/886601-minimum-quantity-ignored-at-checkout#261175 "-- url of the page with the problem -- :   www.artistpapers.co.uk  -- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.2 -- PHP version -- : 7.0.10  Hi,  We have implemented a minimum quantity on some products but it appears this is not respected at checkout. If I set a minimum quantity of 5 on an item, and add 5 of that item to the cart, at checkout I can change the item quantity in the cart to a value less than 5. A worse problem is that the price changes from £1 each to FREE - the item isn't free!  EXAMPLE:  Add five of S401-10 a variant of  Go to cart to checkout and it's showing five items at the correct price  Change the quantity to 3 (which I shouldn't be able to do ) and price changes to FREE  An urgent solution to this would be appreciated.  Many thanks,  Ian")*

Hi,

Yes, if the customer is trying to modify the quantity outside the limits, the product can be removed.
I have an open task for HikaShop 3 in order to improve the system and provide a more logical approach.
So right now if you update to HikaShop 3 (in a test/pre-production website ; it is a major release you should not perform an update in a live site like that) you will still have the issue but I hope to fix it soon.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg4NjYwMS1taW5pbXVtLXF1YW50aXR5LWlnbm9yZWQtYXQtY2hlY2tvdXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.100 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
