make order of the items in the cart deterministic

Maybe it depends on the dbms you're using but with MySQL at least, the order of the items in the cart can vary from one request to another which can confuse the user.