minishop2 - Minimum order amount: possible?
        Is there a way to set a minimum order amount in minishop2?
I want that customers must reach a minimum amount before they can send a order.
Thank you for your help.
Fabian
    
    
                                                                                
            I want that customers must reach a minimum amount before they can send a order.
Thank you for your help.
Fabian
Комментарии: 3
                Yes, you can use system event msOnSubmitOrder and return an error if something not good.
                    switch ($modx->event->name) {
    case 'msOnSubmitOrder':
        $cart = $order->ms2->cart->status();
        if ($cart['total_cost'] < 1000) { // Your amount
            return $modx->event->output([
                'success' => false,
                'message' => 'You need to add more products',
            ]);
        }
    }
}Russian docs            
                Thank you Vasily,
works like a charm.
best
Fabian
                    works like a charm.
best
Fabian
                You are welcome!            
                    
                            Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.