Order multiples

  • Posts: 23
  • Thank you received: 2
11 years 4 weeks ago #130171

Hi. Need some advice.

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
11 years 4 weeks ago #130186

Hi,
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.

  • Posts: 23
  • Thank you received: 2
11 years 4 weeks ago #130338

Thanks Mohamed. However, a shopper may not want to buy 3 bottles of one variety of wine - they might want a mixture and that mixture needs to be of a multiple of 3.

Any other thoughts?

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 3 weeks ago #130397

Ok, so like it's said on the developer documentation (some development skill will be required) :

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.

Time to create page: 0.058 seconds
Powered by Kunena Forum