//ar
public function redirect_after_login() {
// Call Cart Model to get the number of items in the cart for the logged-in user
$cart_count = $this->cart_model->get_cart_item_count($this->session->userdata('user_id'));
// Perform redirection based on cart item count
if ($cart_count >= 1) {
// Redirect to checkout if there are 1 or more items
redirect('https://www.mygovindas.com/checkout');
} else {
// Redirect to order online if no items in cart
redirect('https://www.mygovindas.com/order-online');
}
}