- Posts: 112
- Thank you received: 0
Product price minimum quantity
I can't set minimum quantity for a price to 1 - upon saving it gets set to 0. Is this as per design? What should I do if I need to set min qty to 1?
Thank you.
Please Log in or Create an account to join the conversation.
The min quantity 0 and 1 have the same meaning because you cannot have a quantity of 0 for a product in the cart. When you set a quantity of 0 for a product the product is removed from the cart automatically.
That's why you don't need to set a minimum quantity of 1.
Please Log in or Create an account to join the conversation.
Thank you!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
There is already a check on the minimum quantity. You cannot have a product with a quantity lower to 1 in the cart in HikaShop. If the user try to set a negative quantity or 0, the product is removed from the cart.
That check is done in the _checkQuantity function of the file administrator/components/com_hikashop/classes/cart.php
Please Log in or Create an account to join the conversation.
I will have to find a way of introducing 1 as minimum quantity. If you could I would suggest reviewing your design and introduce all numbers except negative (0,1,2+) as minimum quantities.
Sorry, love your product, however disagree with this design.
Please Log in or Create an account to join the conversation.
If you would explain what you're trying to do, maybe I could understand why you would want someone to be able to order 0 times a product...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Just edit the file price of the view product via the menu Display->Views and add the line:
if(empty($row->price_min_quantity)) $row->price_min_quantity = 1;
after the line:
$row =& $this->element->prices[$i];
And you will have 1 instead of 0. The rest of the system will be the same.
Please Log in or Create an account to join the conversation.
One more question - how does the system count product availability - quantity? Does take into account order statuses, like created, confirmed, cancelled? Does it add back a quantity to a product if an order gets cancelled?
I also noticed that product quantity is adjusted when an order is created. Is it possible to change that quantity is adjusted when order status is set to confirmed?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Is it possible to change that quantity is adjusted when order status is set to confirmed?
Please Log in or Create an account to join the conversation.
There is no option to change the quantity only when the order is confirmed.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.