/**
  * @param $userId
  * @return mixed cart id
  * @throws \Exception
  */
 public function getCartForCurrentUser($userId)
 {
     $cartId = $this->db->getCartByUserId($userId);
     if ($cartId == null || $cartId['id'] == null) {
         throw new \Exception("This user does not have a cart.");
     }
     return $cartId['id'];
 }