Skip to main content

Minimum total order

More
13 years 4 months ago #106176 by Nayeh
Minimum total order was created by Nayeh
Hi there

Because of packaging constraints, we only allow our online customers to buy a minimum of 6 of our products, and in multiples thereof.

This can be a mix of six different or 12 different wines though so the "min order amount" per wine doesn't apply.

Is it possible for Hikashop to do a validation check on the number of units they have before they are allowed to buy and pop up an error message if they have an incorrect number?

Thanks

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

More
13 years 4 months ago #106266 by nicolas
Replied by nicolas on topic Minimum total order
Hi,

You should just add a check on the file 'cart' of the 'checkout' view via the menu Display->Views and add such code:
Code:
<?php $total = 0; foreach($this->products as $product){ $total+=$product->cart_product_quantity; } if($total%6){ $app =& JFactory::getApplication(); $app->enqueueMessage('Not possible'); $this->nextButton = false; }

Or you can also do it with manual shipping methods. Suppose that all your products weight 1kg. You could create shipping methods with range restrictions from 5.5 to 6.5, from 11.5 to 12.5, etc. And the system wouldn't find any shipping method when the weight wouldn't be in these ranges and wouldn't let the user finish the order.

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

More
8 years 7 months ago #286985 by Mehul_Hikashop
Replied by Mehul_Hikashop on topic Minimum total order
Hello , I am not able to find above file please share full path of file and tell me where to add this code

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

More
8 years 7 months ago #286986 by nicolas
Replied by nicolas on topic Minimum total order
Hi,

It is components/com_hikashop/views/checkout/tmpl/cart.php
Please note that it can only work with the "checkout legacy" setting activated in the HikaShop configuration.

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

Time to create page: 0.183 seconds
Powered by Kunena Forum