It is only one method that you need to copy, you would be best adding a method to the Cart class itself. The Cart class will work with the $this->db->query() calls as it already has $db assigned to it even though it is not a Controller/Model. In this post we have share load Model outside Controller in OpenCart.
Should you wish to do this, [...]