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
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;
}