Adapted for Code Igniter and Gocart