Minimum order limit for the specific group

Hi there,

I would like to set minimum order limit for the specific group.

eg Wholesale group has 500 limit and only for this or higher value fn_allow_place_order will be true.

What should be the correct code for this condition?



I would like to modify the code but do not know how to check the logged in user group.



help me guys :slight_smile:



Thank you in advance for your help and sorry if anything is not clear I’m new here



/core/fn.cart.php


//
// Checks if order can be placed
//
function fn_allow_place_order(&$cart)
{
$total = $cart['total'];

fn_set_hook('allow_place_order', $total, $cart);

$cart['amount_failed'] = (Registry::get('settings.General.min_order_amount') > $total && floatval($total));

if (!empty($cart['amount_failed']) || !empty($cart['shipping_failed'])) {
return false;
}

return true;
}




Do you still need the ability to set a minimum order amount for wholesale membership?

I’ve created a cheap mod to solve this issue. It allows you to set a minimum purchase amount for each group. It works the same way as the minimum purchase in the setting (even giving you the same warning). The link is in my sig.

[quote name=‘gginorio’]I’ve created a cheap mod to solve this issue. It allows you to set a minimum purchase amount for each group. It works the same way as the minimum purchase in the setting (even giving you the same warning). The link is in my sig.[/QUOTE]



Interested in this mod… Is it available…???