Switched serialize/unserialize in Cart class to json_encode/json_decode for greater security.