- Posts: 23
- Thank you received: 2
Order multiples
- elucidbusiness
-
Topic Author
- Offline
I have a client who operates a winery and requires that orders be in multiples of 3 bottles.
So, what they want is to only accept orders that are for 3, 6, 9, 12, 15, 18, 21.... etc bottles.
Can this be achieved in any of the hikashop products?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
The solution will just be to sell your products per pair of 3 bottles, so your customer will be able to purchase a quantity of 1,2,3... pair of 3 bottles.
Please Log in or Create an account to join the conversation.
- elucidbusiness
-
Topic Author
- Offline
- Posts: 23
- Thank you received: 2
Any other thoughts?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
For the quantity input:
You need to create the file templates/YOUR_TEMPLATE/html/hikashop_button.php. We invite you to look at the file administrator/components/com_hikashop/helpers/cart.php for the default code of the function you will define in it. In that file, you will be able to define the function:
hikashop_quantity_render($html,$i,$max_quantity,$min_quantity) => The $html variable will contain the HTML of the "add to cart" button, the $i variable will contain a unique int which will be different for each quantity input on the page, the $max_quantity and $min_quantity will contain the min and max quantity possible for the product. You need to return the whole HTML at the end of your function.
Also, please note that it only works if the option for "Display the quantity field on the product page" is set to "Ajax Input" in the configuration of HikaShop.
Please Log in or Create an account to join the conversation.